I have a website build on Wordpress and Formidable Pro plugin.
I now also need to include validation for some extra fields in my form:
1. Age - Minimum 20 and maximum 70. I have a field with social security number, in the format ddmmyyxxxxx, where the first 6 digits is the date of birth. I need the script to first calculate the age today from that field, and then to give a red error in the same style like the social security number validation that is already setup, with the message "Age must be between 20 and 70" if the age is outside of the criteria.
2. GrossYearlyIncome - I have a field where the user can insert his annual income. If the inserted value is below 200 000, then I need the red message appearing below the field with the text "Income can not be lower than 200 000". I already have a validation for this through Formidable native validation for range in number fields, but the invalid message is not appearing like it should, it now shows as a tooltip.
3. I have a field with some dropdown options. I want to make some of this options invalid, so it´s showing with the same error style like the above fields, with the error message "You can not have this jobstatus".
4. Redemption: In the first page of the form the user can select an amount from a dropdown in field 1. In the last page of the form I have a repetable section, where users can enter all of his redemptions. This section contains a dropdown box with question yes or no. I need a validation that checks if the sum of all redemptions where the checkbox with the option "yes" is less than the selected value in field 1. If it´s not less then I need to show the invalid message "The sum of the redemptions with the option yes, can not exceed field 1."
The code snippet that now runs for validations is inserted in the custom HTML of Formidable on the box "After fields".
All validation need to done directly after the user moves on to the next field, clicks outside of the field or click on next/send.
All custom coding need to be done in front-end, either in customize html in the form settings of the Formidable Pro plugin or in the plugin "Code snippets". The reason to this is that we have a complex working website, and we can not have any backend coding on this site.
I need to get documentation of the custom coding, so I understand what to change and where to change if I make adjustments in the form options.