How to validate the form only if two widget have the same value
Check the screenshot here : http://hpics.li/178dbdd
The Error message field should contain the error message you want to be displayed when the comparison fails.
The Parameter field should contain the groovy script performing the comparison (field1.equals(field2) for example).
Thank you mehdi.kettani for your answer. I did what u told me , and it works, i put in the message some groovy code like :
I still have a litle problem. When i execute my form , he shows me the following message : An element with id CréerNewUtilisateur is missing from the page template.
Just for information my process create new users.
So can you tell me how to specify my own error message ?
Hi Hichem,
You can do that using a form validator (either with groovy or regular expression). When the submit button is clicked, the form validator will compare your two widgets and if they are not the same, the user will see the error message you specified. You can find the form validator in the form general menu (by clicking anywhere outside your form).
Best regards,
Mehdi
Comments
Thank you it works :)