This topic is locked

required to enter in one or another field

8/20/2009 5:54:47 PM
ASPRunnerPro General questions
M
mfred author

An application that I am building needs to have a delivery entry where the user either selects from a delivery options menu or enters text in a shipping field. Is there a way to require entry in one or the other without requiring both?

J
Jane 8/21/2009

Hi,
you can define field as requried using custom JavaScript code.

Here is a sample:

AddScript2Postload "define('value_FieldName','IsRequired','FieldName');",""



You can add this code in the custom event (Insert ASP code snippet option on the Visual Editor tab).

M
mfred author 8/21/2009

If the 2 fields are DeliveryOption and ShippingOption, then would the code be as follows?
AddScript2Postload "define('value_DeliveryOption','IsRequired','ShippingOption');",""

J
Jane 8/24/2009

Here is a sample:

AddScript2Postload "define('value_DeliveryOption','IsRequired','DeliveryOption');",""

AddScript2Postload "define('value_ShippingOption','IsRequired','ShippingOption');",""