Hello Everyone.I am trying to make one conditional page form whit the help of 4-5 pagebreak in rsform. Here is the code which is act as to skip the form which we want to skip (with the help of page break button).
this code will go into css and javascript frame from back end
<script type="text/javascript">
function rsfp_conditionalPage(formId, page, totalPages, validate){
//the following if clause will address the change page functionality when the "Next" button is used
if(page == 1 && document.getElementById('hiddenfield').value!=0 && typeof validate != 'undefined'){
/* this will check if the user tries to change the page to the conditional page(the second page),if the user
selected to skip this page and if a "Next" button was used*/
document.getElementById("Email").value = "
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
";
rsfp_changePage(formId, page, totalPages, validate);
/* this will trigger the default change page function while incrementing the page parameter one more time so that
the form moves to the third page directly*/
return '';
// this is used so that after the function is triggered the script is stopped
}
//the following if clause will address the change page functionality when the "Previous" button is used
if(page == 1 && document.getElementById('hiddenfield').value!=0 && typeof validate == 'undefined'){
/* this will check if the user tries to return to the conditional page(the second page),if the user selected to
skip this page and if a "Previous" button was used*/
rsfp_changePage(formId, page-1, totalPages, validate);
/* this will trigger the default change page function while decrementing the page parameter so that the form
moves to the first page directly*/
return '';
// this is used so that after the function is triggered the script is stopped
}
rsfp_changePage(formId, page, totalPages, validate);
// this is used so that the multi-page display is properly shown when the form is first loaded
}
</script>
this code will got in PHP script call on page display frame
$formLayout = str_replace('rsfp_changePage(', 'rsfp_conditionalPage(', $formLayout);
But when I fillup the from and click on page-break button,it will fire validation part and through an error related to validation (i have already fillup all mandatory fields in form).
Please HELP
Thanks