Advertisement
adczk

Forminator - custom validation with visibility conditions example

Oct 3rd, 2023
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.26 KB | None | 0 0
  1. {"type":"form","data":{"fields":[{"id":"name-1","element_id":"name-1","form_id":"wrapper-6351-1152","parent_group":"","type":"name","options":[],"cols":"12","conditions":[],"wrapper_id":"wrapper-6351-1152","field_label":"Name","placeholder":"E.g. John Doe","prefix_label":"Prefix","fname_label":"First Name","fname_placeholder":"E.g. John","mname_label":"Middle Name","mname_placeholder":"E.g. Smith","lname_label":"Last Name","lname_placeholder":"E.g. Doe","prefix":"true","fname":"true","mname":"true","lname":"true","required_message":"Name is required.","prefix_required_message":"Prefix is required.","fname_required_message":"First Name is required.","mname_required_message":"Middle Name is required.","lname_required_message":"Last Name is required.","layout_columns":"2","multiple_name":"false"},{"id":"html-1","element_id":"html-1","form_id":"wrapper-7800-9024","parent_group":"","type":"html","options":[],"cols":"12","conditions":[{"element_id":"name-1","rule":"contains","value":"@"}],"wrapper_id":"wrapper-7800-9024","field_label":"HTML","variations":"<p>Name field error</p>"},{"id":"email-1","element_id":"email-1","form_id":"wrapper-2833-7022","parent_group":"","type":"email","options":[],"cols":"12","conditions":[],"wrapper_id":"wrapper-2833-7022","validation":"","placeholder":"E.g. [email protected]","field_label":"Email Address"},{"id":"html-2","element_id":"html-2","form_id":"wrapper-4274-9509","parent_group":"","type":"html","options":[],"cols":"12","conditions":[{"element_id":"email-1","rule":"contains","value":"mailinator"}],"wrapper_id":"wrapper-4274-9509","field_label":"HTML","variations":"<p>Mail field error</p>"},{"id":"textarea-1","element_id":"textarea-1","form_id":"wrapper-1505-3852","parent_group":"","type":"textarea","options":[],"cols":"12","conditions":[],"wrapper_id":"wrapper-1505-3852","input_type":"line","limit_type":"characters","field_label":"Text","placeholder":"E.g. text placeholder\nYou can add new line"},{"id":"html-3","element_id":"html-3","form_id":"wrapper-4560-1220","parent_group":"","type":"html","options":[],"cols":"12","conditions":[{"element_id":"textarea-1","rule":"contains","value":"lorem ipsum"}],"wrapper_id":"wrapper-4560-1220","field_label":"HTML","variations":"<p>Textarea error</p>"}],"settings":{"pagination-header":"nav","paginationData":{"pagination-header-design":"show","pagination-header":"nav"},"formName":"Test","version":"1.26.0","form-border-style":"none","form-padding":"","form-border":"","fields-style":"open","field-image-size":"custom","validation":"on_submit","akismet-protection":"0","form-style":"default","enable-ajax":"true","autoclose":"true","submission-indicator":"show","indicator-label":"Submitting...","form-type":"default","submission-behaviour":"behaviour-thankyou","thankyou-message":"Thank you for contacting us, we will be in touch shortly.","submitData":{"custom-submit-text":"Send Message","custom-invalid-form-message":"Error: Your form is not valid, please fix the errors!","conditions":[{"element_id":"name-1","rule":"contains","value":"@"},{"element_id":"email-1","rule":"contains","value":"mailinator"},{"element_id":"textarea-1","rule":"contains","value":"lorem ipsum"}],"condition_action":"hide","condition_rule":"any"},"validation-inline":"1","form-expire":"no_expire","form-padding-top":"0","form-padding-right":"0","form-padding-bottom":"0","form-padding-left":"0","form-border-width":"0","form-border-radius":"0","cform-label-font-family":"Roboto","cform-label-custom-family":"","cform-label-font-size":"12","cform-label-font-weight":"bold","cform-title-font-family":"Roboto","cform-title-custom-family":"","cform-title-font-size":"45","cform-title-font-weight":"normal","cform-title-text-align":"left","cform-subtitle-font-family":"Roboto","cform-subtitle-custom-font":"","cform-subtitle-font-size":"18","cform-subtitle-font-weight":"normal","cform-subtitle-text-align":"left","cform-input-font-family":"Roboto","cform-input-custom-font":"","cform-input-font-size":"16","cform-input-font-weight":"normal","cform-radio-font-family":"Roboto","cform-radio-custom-font":"","cform-radio-font-size":"14","cform-radio-font-weight":"normal","cform-select-font-family":"Roboto","cform-select-custom-family":"","cform-select-font-size":"16","cform-select-font-weight":"normal","cform-multiselect-font-family":"Roboto","cform-multiselect-custom-font":"","cform-multiselect-font-size":"16","cform-multiselect-font-weight":"normal","cform-dropdown-font-family":"Roboto","cform-dropdown-custom-font":"","cform-dropdown-font-size":"16","cform-dropdown-font-weight":"normal","cform-calendar-font-family":"Roboto","cform-calendar-custom-font":"","cform-calendar-font-size":"13","cform-calendar-font-weight":"normal","cform-button-font-family":"Roboto","cform-button-custom-font":"","cform-button-font-size":"14","cform-button-font-weight":"500","cform-timeline-font-family":"Roboto","cform-timeline-custom-font":"","cform-timeline-font-size":"12","cform-timeline-font-weight":"normal","cform-pagination-font-family":"","cform-pagination-custom-font":"","cform-pagination-font-size":"16","cform-pagination-font-weight":"normal","payment_require_ssl":"","submission-file":"delete","store_submissions":"1","form_name":"test","form_status":"publish","use-custom-css":"1","custom_css":"","sc_email_link":"1","sc_message":"<p>Your form has been saved as draft and a resume link has been generated so you can return to the form anytime within {retention_period} days from today. Copy and save the link or enter your email address below to have the link sent to your mail.</p><p>These fields weren't saved to your submission draft: Paypal, Stripe, Signature, Password, Captcha, and Upload. Kindly fill them out before submitting the form.</p>","use_save_and_continue":"","cform-color-settings":"","radio-background-active":"#ed0000","form-font-family":"custom","calendar-select-border":"","calendar-select-bg":"","calendar-select-color":"","use_ajax_load":"1"},"client_id":null,"integration_conditions":[],"behaviors":[{"slug":"behavior-1234-4567","label":"","autoclose-time":"5","autoclose":"","newtab":"sametab","thankyou-message":"Thank you for contacting us, we will be in touch shortly.","email-thankyou-message":"","manual-thankyou-message":"","submission-behaviour":"behaviour-thankyou","redirect-url":"http://ambiante.pl/wpmu/free/?myid={hidden-1}"}],"notifications":[]},"status":"publish","version":"1.26.0"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement