Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wpmudev-sls/45e1629ea253386daab3f3600cc4314d to your computer and use it in GitHub Desktop.
Save wpmudev-sls/45e1629ea253386daab3f3600cc4314d to your computer and use it in GitHub Desktop.
Forminator - Skip Steps in Pagination Form
<?php
/**
* Plugin Name: [Forminator] Skip Steps in Pagination Form
* Plugin URI: https://premium.wpmudev.org
* Description: With this snippet and some extra configurations in your form is possible to skip steps according to user-selected choices in a control field - works with checkboxes, radio buttons and selects.
* Author: Glauber Silva @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* Jira Task: FOR-428 and SLS-263 and SLS-2035
* License: GPLv2 or later
*
* @package WPMUDEV_Forminator_Skip_Steps_in_Pagination_Form
*/
defined( 'ABSPATH' ) || exit;
/**
*
* EXTRA CONFIGURATIONS:
*
* With the pagination form already defined, follow the step by step below:
*
* 1) In the first step of the form, add a control field (radio, select or checkbox) with the page options as for example: "none", "page 3" and "page 6" – then access the CALCULATIONS tab and set the value 0 to the “none” option, the value 3 to the "page 3" option and the value 6 to the "page 6" option. In that same field, go to the STYLING tab and in the input that appears insert: forminator-steps-control
*
* 2) Still in the first step of the form, add another field, but now of type calculations. Then go to the SETTINGS tab and set it to hidden. In the STYLING tab add in the input the value forminator-pages-to-display and in the CALCULATIONS tab define the token of the previously created field that should be something like these: {select-1} or {radio-1} or {checkbox-1}
*
* 3) If you are using a checkbox as a control field, you’ll need to add a number field (still in the first step) with the default number of steps (E.g: 3) you want to start the form. Then go to the STYLING tab and add in the input the value forminator-default-steps and on the visibility conditions setup it to keep this field hidden
*
* IMPORTANT: If you have fields required in steps that will be hidden, define conditions of visibility for those fields similar to the conditions defined in the required fields of the sample-form-2-with-required-fields.txt file attached to this snippet.
*
*/
/**
* If the value on the hidden calculation field is less then total of valid steps (all steps - last step), so skip extra pages and go right to the submit page.
*/
function wpmudev_forminator_skip_pagination_steps() {
ob_start();
?>
<script type="text/javascript">
function readyHandler() {
setTimeout( function() {
/**
* VISIBILITY CONTROLS FOR STEPS
*/
function controlStepsToDisplay() {
var pages = document.querySelector( '.forminator-pages-to-display' );
pages = document.querySelector( '.forminator-pages-to-display' ).querySelector( 'input' ).value;
if ( pages > 0 ) {
pages = pages - 1;
} else {
// If you are using a checkbox as a control field, you'll need to change the default value of the number field with this class ("forminator-default-steps") to display the default number of steps that should be displayed.
var default_steps = document.querySelector( '.forminator-default-steps' );
if ( typeof( default_steps ) != 'undefined' && default_steps != null ) {
pages = default_steps.querySelector( 'input' ).value;
}
}
var all_steps = document.querySelectorAll('.forminator-step');
for ( var i = 0, max = all_steps.length; i < max; i++ ) {
var step = document.querySelectorAll( '.forminator-step' )[i]; // Step Element (Dot and label)
var prev = step.previousElementSibling; // Progress Bar Element - class="forminator-break"
var content = document.querySelectorAll( '[data-step]' )[i]; // Step Content Element
step.style.display = 'block';
prev.style.display = 'block';
content.style.display = 'block';
if ( i > pages && i < ( all_steps.length - 1 ) ) {
step.style.display = 'none';
prev.style.display = 'none';
content.style.display = 'none';
}
}
}
// Set initial steps to display
controlStepsToDisplay();
// Change steps to display when a control field (radio, check or select) changes
var control = document.querySelector( '.forminator-steps-control' );
if ( typeof( control ) != 'undefined' && control != null ) {
// Intercepting changes on "radio" and "check" fields
control.addEventListener( 'change', function() {
controlStepsToDisplay();
});
// Intercepting changes on "select" fields
var controlSelect = control.querySelector('.forminator-field');
if ( typeof( controlSelect ) != 'undefined' && controlSelect != null ) {
//Using mutation observer because the "change" event not worked for "select" fields
var target = controlSelect;
// Create an observer instance
var observer = new MutationObserver( function( mutations ) {
//console.log('Target Changed: ',target);
controlStepsToDisplay();
});
// Configuration of the observer
var config = {
attributes: true,
childList: true,
characterData: true
};
// Pass in the target node, as well as the observer options
observer.observe( target, config );
}
}
/**
* VISIBILITY CONTROLS FOR BUTTONS
*/
function checkIfSkipCurrentStep( btn, step ) {
if ( step.style.display === 'none' ) {
setTimeout( function(){
btn.click();
}, 1 );
}
}
var btn_back = document.querySelector( '.forminator-button-back' );
var btn_next = document.querySelector( '.forminator-button-next' );
if ( typeof( btn_back ) != 'undefined' && btn_back != null ) {
btn_back.addEventListener( 'click', function() {
var curr_step = document.querySelector( '.forminator-current' );
checkIfSkipCurrentStep( btn_back, curr_step );
});
}
if ( typeof( btn_next ) != 'undefined' && btn_next != null ) {
btn_next.addEventListener('click', function() {
var curr_step = document.querySelector( '.forminator-current' );
checkIfSkipCurrentStep( btn_next, curr_step );
});
}
}, 1 );
}
// Check if the DOMContentLoaded has already been completed
if ( document.readyState !== 'loading' ) {
readyHandler();
} else {
document.addEventListener( 'DOMContentLoaded', readyHandler );
}
</script>
<?php
$javascript = ob_get_clean();
echo $javascript; // phpcs:ignore
}
add_filter( 'wp_footer', 'wpmudev_forminator_skip_pagination_steps', PHP_INT_MAX );
{"type":"form","data":{"fields":[{"id":"section-1","element_id":"section-1","form_id":"wrapper-197-6627","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-197-6627","section_title":"Page 1","cform-section-border-style":"none"},{"id":"calculation-1","element_id":"calculation-1","form_id":"wrapper-5559-6296","type":"calculation","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-5559-6296","field_label":"Pages (Hidden Field)","placeholder":"E.g. Calculated Value","formula":"{radio-1}","custom-class":"forminator-pages-to-display","hidden":true},{"id":"html-1","element_id":"html-1","form_id":"wrapper-261-1466","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-261-1466","field_label":"HTML","variations":"<p><strong>Basic info goes here...</strong></p>"},{"id":"radio-1","element_id":"radio-1","form_id":"wrapper-3404-6207","type":"radio","options":[{"label":"Yes","value":"yes","calculation":"2"},{"label":"No","value":"no","calculation":"1"}],"cols":12,"conditions":[],"wrapper_id":"wrapper-3404-6207","value_type":"radio","field_label":"Do you want more info?","layout":"vertical","custom-class":"forminator-steps-control","calculations":"true"},{"id":"page-break-1","element_id":"page-break-1","form_id":"wrapper-3387-2329","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-3387-2329","btn_left":"« Previous Step","btn_right":"Next Step »"},{"id":"section-2","element_id":"section-2","form_id":"wrapper-1865-9497","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-1865-9497","section_title":"Page 2","cform-section-border-style":"none"},{"id":"html-2","element_id":"html-2","form_id":"wrapper-6798-3485","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-6798-3485","field_label":"HTML","variations":"<p><strong>EXTRA info goes here...</strong></p>","formid":"wrapper-7412-8374"},{"id":"page-break-2","element_id":"page-break-2","form_id":"wrapper-1639-693","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-1639-693","btn_left":"« Previous Step","btn_right":"Next Step »"},{"id":"html-3","element_id":"html-3","form_id":"wrapper-522-4575","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-522-4575","field_label":"HTML","variations":"<p><strong>FINISH info goes here...</strong></p>","formid":"wrapper-2774-4869"}],"settings":{"pagination-header":"nav","paginationData":{"pagination-header-design":"show","pagination-header":"nav"},"formName":"Skip Pages","version":"1.12.1.1","form-border-style":"none","form-padding":"","form-border":"","fields-style":"open","validation":"on_submit","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!"},"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","form_name":"skip-pages","form_status":"publish"},"client_id":null,"notifications":[]},"status":"publish","version":"1.12.1.1"}
{"type":"form","data":{"fields":[{"id":"section-1","element_id":"section-1","form_id":"wrapper-197-6627","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-197-6627","section_title":"Page 1","cform-section-border-style":"none"},{"id":"calculation-1","element_id":"calculation-1","form_id":"wrapper-5559-6296","type":"calculation","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-5559-6296","field_label":"Pages (Hidden Field)","placeholder":"E.g. Calculated Value","formula":"{select-1}","custom-class":"forminator-pages-to-display","hidden":true},{"id":"html-1","element_id":"html-1","form_id":"wrapper-261-1466","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-261-1466","field_label":"HTML","variations":"<p><strong>Basic info goes here...<\/strong><\/p>"},{"id":"select-1","element_id":"select-1","form_id":"wrapper-4236-8680","type":"select","options":[{"label":"None","value":"none","limit":"","default":false,"calculation":"0"},{"label":"3 Steps","value":"3-steps","limit":"","calculation":"3"},{"label":"6 Steps","value":"6-steps","limit":"","calculation":"6"}],"cols":12,"conditions":[],"wrapper_id":"wrapper-4236-8680","value_type":"single","field_label":"How many steps do you want to display?","calculations":"true","custom-class":"forminator-steps-control","required":true},{"id":"page-break-1","element_id":"page-break-1","form_id":"wrapper-3387-2329","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-3387-2329","btn_left":"\u00ab Previous Step","btn_right":"Next Step \u00bb"},{"id":"section-2","element_id":"section-2","form_id":"wrapper-1865-9497","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-1865-9497","section_title":"Page 2","cform-section-border-style":"none"},{"id":"html-2","element_id":"html-2","form_id":"wrapper-6798-3485","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-6798-3485","field_label":"HTML","variations":"<p><strong>EXTRA info goes here...<\/strong><\/p>","formid":"wrapper-7412-8374"},{"id":"page-break-2","element_id":"page-break-2","form_id":"wrapper-1639-693","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-1639-693","btn_left":"\u00ab Previous Step","btn_right":"Next Step \u00bb"},{"id":"section-3","element_id":"section-3","form_id":"wrapper-565-3592","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-565-3592","section_title":"Page 3","cform-section-border-style":"none","formid":"wrapper-7271-7167"},{"id":"html-3","element_id":"html-3","form_id":"wrapper-2368-2621","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-2368-2621","field_label":"HTML","variations":"<p><strong>EXTRA info goes here...<\/strong><\/p>","formid":"wrapper-2774-4869"},{"id":"page-break-3","element_id":"page-break-3","form_id":"wrapper-8091-5683","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-8091-5683","btn_left":"\u00ab Previous Step","btn_right":"Next Step \u00bb","formid":"wrapper-6271-8438"},{"id":"section-4","element_id":"section-4","form_id":"wrapper-7991-7790","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-7991-7790","section_title":"Page 4","cform-section-border-style":"none","formid":"wrapper-7838-3926"},{"id":"html-4","element_id":"html-4","form_id":"wrapper-7581-2487","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-7581-2487","field_label":"HTML","variations":"<p><strong>EXTRA info goes here...<\/strong><\/p>","formid":"wrapper-9581-8468"},{"id":"name-1","element_id":"name-1","form_id":"wrapper-5297-6222","type":"name","options":[],"cols":12,"conditions":[{"element_id":"calculation-1","rule":"is_less","value":"4"}],"wrapper_id":"wrapper-5297-6222","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.","required":true,"condition_action":"hide"},{"id":"page-break-4","element_id":"page-break-4","form_id":"wrapper-3831-8383","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-3831-8383","btn_left":"\u00ab Previous Step","btn_right":"Next Step \u00bb","formid":"wrapper-8763-8046"},{"id":"section-5","element_id":"section-5","form_id":"wrapper-3042-4161","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-3042-4161","section_title":"Page 5","cform-section-border-style":"none","formid":"wrapper-3042-4161"},{"id":"html-5","element_id":"html-5","form_id":"wrapper-4583-9796","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-4583-9796","field_label":"HTML","variations":"<p><strong>EXTRA info goes here...<\/strong><\/p>","formid":"wrapper-4472-3043"},{"id":"email-1","element_id":"email-1","form_id":"wrapper-5429-3749","type":"email","options":[],"cols":12,"conditions":[{"element_id":"calculation-1","rule":"is_less","value":"4"}],"wrapper_id":"wrapper-5429-3749","validation":false,"placeholder":"E.g. john@doe.com","field_label":"Email Address","required":true,"condition_action":"hide"},{"id":"page-break-5","element_id":"page-break-5","form_id":"wrapper-2060-3996","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-2060-3996","btn_left":"\u00ab Previous Step","btn_right":"Next Step \u00bb","formid":"wrapper-2060-3996"},{"id":"section-6","element_id":"section-6","form_id":"wrapper-7596-503","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-7596-503","section_title":"Page 6","cform-section-border-style":"none","formid":"wrapper-6835-6069"},{"id":"html-6","element_id":"html-6","form_id":"wrapper-6269-9286","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-6269-9286","field_label":"HTML","variations":"<p><strong>EXTRA info goes here...<\/strong><\/p>","formid":"wrapper-5160-1905"},{"id":"phone-1","element_id":"phone-1","form_id":"wrapper-8744-4326","type":"phone","options":[],"cols":12,"conditions":[{"element_id":"calculation-1","rule":"is_less","value":"4"}],"wrapper_id":"wrapper-8744-4326","required":true,"limit":10,"limit_type":"characters","validation":"false","phone_validation_type":"standard","field_label":"Phone","placeholder":"E.g. +1 300 400 5000","condition_action":"hide"},{"id":"page-break-6","element_id":"page-break-6","form_id":"wrapper-8214-6271","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-8214-6271","btn_left":"\u00ab Previous Step","btn_right":"Next Step \u00bb","formid":"wrapper-3296-3546"},{"id":"html-7","element_id":"html-7","form_id":"wrapper-8255-328","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-8255-328","field_label":"HTML","variations":"<p>FINISH info goes here...<\/p>","formid":"wrapper-6521-1049"}],"settings":{"pagination-header":"nav","paginationData":{"pagination-header-design":"show","pagination-header":"nav"},"formName":"Skip Pages With Required Fields","version":"1.12.1.1","form-border-style":"none","form-padding":"","form-border":"","fields-style":"open","validation":"on_submit","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!"},"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","form_name":"skip-pages","form_status":"publish"},"client_id":null,"notifications":[]},"status":"publish","version":"1.12.1.1"}
{"type":"form","data":{"fields":[{"id":"section-1","element_id":"section-1","form_id":"wrapper-197-6627","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-197-6627","section_title":"Page 1 – the personal info","cform-section-border-style":"none"},{"id":"calculation-1","element_id":"calculation-1","form_id":"wrapper-5559-6296","type":"calculation","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-5559-6296","field_label":"Pages (Hidden Field)","placeholder":"E.g. Calculated Value","formula":"{checkbox-1}","custom-class":"forminator-pages-to-display","hidden":true},{"id":"checkbox-1","element_id":"checkbox-1","form_id":"wrapper-9699-777","type":"checkbox","options":[{"label":"Yes","value":"yes","key":"5146-7166","calculation":"1"}],"cols":12,"conditions":[],"wrapper_id":"wrapper-9699-777","value_type":"checkbox","field_label":"Are you a client?","layout":"vertical","calculations":"true","custom-class":"forminator-steps-control"},{"id":"number-1","element_id":"number-1","form_id":"wrapper-6987-949","type":"number","options":[],"cols":12,"conditions":[{"element_id":"checkbox-1","rule":"is","value":"yes"},{"element_id":"checkbox-1","rule":"is_not","value":"yes"}],"wrapper_id":"wrapper-6987-949","calculations":"true","limit_min":1,"limit_max":150,"field_label":"Default Steps (Hidden Field)","placeholder":"E.g. 10","custom-class":"forminator-default-steps","description":"If you are using a checkbox as a control field, you'll need to change this value to display the default number of steps that should be displayed.","default_value":"4","condition_action":"hide","condition_rule":"any"},{"id":"html-1","element_id":"html-1","form_id":"wrapper-261-1466","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-261-1466","field_label":"HTML","variations":"<p>EXTRA info goes here...</p>\n<p>⚠️ <strong>ATTENTION!!!</strong><br /><br />If you are using a checkbox as a control field, you'll need to change the default value of the number field with the class \"forminator-default-steps\" to display the default number of steps that should be displayed.<br /><br />On this sample form, the field name is: <i class=\"sui-icon-element-number\" aria-hidden=\"true\"></i><strong><span class=\"fui-field--name\"><span class=\"fui-field--label\">Default Steps (Hidden Field)</span></span></strong></p>"},{"id":"page-break-1","element_id":"page-break-1","form_id":"wrapper-3387-2329","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-3387-2329","btn_left":"« Previous Step","btn_right":"Next Step »"},{"id":"section-2","element_id":"section-2","form_id":"wrapper-1865-9497","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-1865-9497","section_title":"Page 2 – New client details","cform-section-border-style":"none"},{"id":"name-1","element_id":"name-1","form_id":"wrapper-2585-2767","type":"name","options":[],"cols":12,"conditions":[{"element_id":"calculation-1","rule":"is","value":"1"}],"wrapper_id":"wrapper-2585-2767","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.","required":true,"condition_action":"hide"},{"id":"html-2","element_id":"html-2","form_id":"wrapper-6798-3485","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-6798-3485","field_label":"HTML","variations":"<p>EXTRA info goes here...</p>","formid":"wrapper-7412-8374"},{"id":"page-break-2","element_id":"page-break-2","form_id":"wrapper-1639-693","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-1639-693","btn_left":"« Previous Step","btn_right":"Next Step »"},{"id":"section-3","element_id":"section-3","form_id":"wrapper-565-3592","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-565-3592","section_title":"Page 3 – Service request form","cform-section-border-style":"none","formid":"wrapper-7271-7167"},{"id":"select-1","element_id":"select-1","form_id":"wrapper-1628-8205","type":"select","options":[{"label":"Option 1","value":"one","limit":"","key":"6997-8336"},{"label":"Option 2","value":"two","limit":"","key":"3508-1991"}],"cols":12,"conditions":[],"wrapper_id":"wrapper-1628-8205","value_type":"single","field_label":"Select"},{"id":"html-3","element_id":"html-3","form_id":"wrapper-2368-2621","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-2368-2621","field_label":"HTML","variations":"<p>EXTRA info goes here...</p>","formid":"wrapper-2774-4869"},{"id":"page-break-3","element_id":"page-break-3","form_id":"wrapper-8091-5683","type":"page-break","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-8091-5683","btn_left":"« Previous Step","btn_right":"Next Step »","formid":"wrapper-6271-8438"},{"id":"section-4","element_id":"section-4","form_id":"wrapper-7991-7790","type":"section","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-7991-7790","section_title":"Page 4 – Book engineer appointment","cform-section-border-style":"none","formid":"wrapper-7838-3926"},{"id":"date-1","element_id":"date-1","form_id":"wrapper-8425-1188","type":"date","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-8425-1188","field_type":"picker","date_format":"mm/dd/yy","default_date":"none","field_label":"Date","placeholder":"Choose Date","icon":"true","day_label":"Day","day_placeholder":"E.g. 01","month_label":"Month","month_placeholder":"E.g. 01","year_label":"Year","year_placeholder":"E.g. 2000","restrict_message":"Please select one of the available dates.","required":true},{"id":"html-4","element_id":"html-4","form_id":"wrapper-7581-2487","type":"html","options":[],"cols":12,"conditions":[],"wrapper_id":"wrapper-7581-2487","field_label":"HTML","variations":"<p>EXTRA info goes here...</p>","formid":"wrapper-9581-8468"}],"settings":{"pagination-header":"nav","paginationData":{"pagination-header-design":"show","pagination-header":"nav","last-steps":"Finish"},"formName":"Skip Steps - Sample With Checkbox and Required Fields","version":"1.14.11","form-border-style":"none","form-padding":"","form-border":"","fields-style":"open","validation":"on_submit","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!"},"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","form_name":"skip-steps-sample-with-checkbox-and-required-fields","form_status":"publish"},"client_id":null,"notifications":[]},"status":"publish","version":"1.14.11"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment