I am very new to forms (this is my first post in the community) and found that the company had a license for Acrobat 8 Pro which can with a copy of Livecycle. I have used a pdf of a deal sheet and have inserted all the relevant fields, tab orders etc. I realise that Livecycle is out of date, but i need to show the benefit of forms before they will agree to a license for another product.
I would like to make a Numeric field (Aretail) mandatory based on whether another Numeric Field (Apex) contains data. So if there is no data in Apex field the Aretail field is not required to be mandatory, if there is data in Apex field the Aretail field is required to be mandatory before allowing the email submit.
I have found many scripts on the web and have had a little success with the following and have written the script in the validate event for the Aretail field (i have no idea if that is correct event to be in but it seems to work to an extent)
Aretail.mandatory = "disabled";
Aretail.mandatory = "error";
This has the desired effect except for when I move out of the Aretail numeric field, or try to submit the form via the submit email button, I get the error popup "Aretail validate failed."
Numeric fields have a pattern set to $zzz,zz9.99, the value tab in objects has no validation pattern set, but the error still remains when i set the validation pattern to the same as the numeric field.
Any help would be greatly appreciated, as this is the only thing stopping me from releasing the form for use.
forget what you do at the moment and change as follows:
2 numeric fields APEX and ARETAIL both NOT mandatory and no other validations! When APEX is left empty (rawValue==null) then the retail field can also be left empty. Submit as Email is a good way to submit in Designer Preview.
Change the preSubmit event of ARETAIL ONLY:
This is how it works:
APEX empty and ARETAIL empty - you can submit (same when ARETAIL is filled)
APEX filled and ARETAIL not:
Once you provided a value then Submit goes ahead
Moved this question to the relevant topic.
It seems this question is not related to AEM product. Could you please move/create this question in respective community forum, so that respective experts can have a look.