In my form I want to create an field where you must fill in you lastname, but in the header of page 2 & 3 , there an field where the last name also must stand.
I've tried and searched for something to create that, but it is not so easy like in microsoft Excel
Does anybody know how I can create somthing like that?
And I have an second question.
I have an group with radio buttons. but if option 2 is selected and text field must be set required and must be open to fill something in that field, if any other option is selected the textfield must me read-only and not required.
The read-only part does work, but the required part doesn't.
Here's my script.
(this.rawValue == 2)
To make a field optional, you can use the mandatory property,but sets its value to "disabled";
Naam_Partner.mandatory = "disabled";
Where you want data to be displayed in several places in a form, you give all of the objects the same name in the hierarchy and then set the binding to 'global', in the Object > Binding palette. This will display the same input in all instances.
Hope that helps,
The automatic field input works really great. But te mandatory option doesn't work.
I have the following script in the click event of the radio buttons.
(this.rawValue == 1)
//Show field and make required
else//Hide field and field is not required
The syntax for making a field required is .mandatory = "error"; (eg not "enabled").
Naam_Verzekering.mandatory = "error";
Hope that helps,
The script now works because it cancels my print action. But is it also possible to show a message if the field is empty? I tried the "message from validation script" box, but that doesn't work.
I have an example here that uses the validationState event and the cancelAction for validation before printing. This means that the target version must be set to v9.1 as a minimum.
You could use an 'empty message' in the Object > Value palette, instead of validation. Otherwise you would build a custom error message in the prePrint event.
John Brinkman explains the perils of validation against null in this post: http://blogs.adobe.com/formfeed/2009/07/script_validation_vs_null_vali.html
If you can live with a target version of 9.1, then I would run with the Form Validation (validationState) settings in the File > Form Properties tab in LC Designer ES2.
If you can't come back and we will do a v9 and below example.