IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#25027 - 01/20/10 04:54 AM requierd fields
Niclas Welander Offline
OL Newbie

Registered: 11/03/09
Posts: 18
Loc: Sweden
Hi. I have a question about requierd fileds in PSW2.
When the customer makes an order there's a field called Referens ID (i think) Is there any way to make this field a requierd field? This is very important to one of our customers. And even for us.

Thank you for helping me,

/Niclas Welander
Printus IT Sweden

Top
#25028 - 01/20/10 03:56 PM Re: requierd fields
Anonymous
Unregistered


You can do this in the skin using jQuery.
You can hook on the submit button and add an additional check on the field that you want to make required. You can also use jQuery to add the red required "*".
Example: add some javascript like this at the end of the head section of template.php:
Code:
$(document).ready(function(){
  $("body.checkout_shippingoptions #fcReferenceLabel").append('<span class="asterisk">*</span>');
  $("body.checkout_shippingoptions #saveButton").click(function() {
    if ($("#fcReferenceField").val()=="") {	
      alert("No value");	
      return false;
    }
    else
      return ajaxSetSaveButtonGlobal();
  });
});
ps. note I only checked this on a PSM Web 7.0 system (but it should work the same on a PSW2.

Top