The system will automatically skip any pages on the Form that do not contain any data. However, when working with logic, you may encounter a situation where the page has content on it but is hidden because certain triggers/conditions were not met. As the page is not actually blank, the system will not automatically skip it, and the Registrant will see a blank page.
In the above case, you can add javascript to the Form to submit and pass through the blank page. The best way to do this is by using a Custom HTML Section and including logic to ensure it only triggers when the conditions that cause a Registrant to see a blank page are met.
JavaScript
<script>
jQuery().ready(function(){
var x = jQuery('[type=text], select, [type=radio], [type=checkbox]').length;
//console.log(x);
if(x <= 0)
{
jQuery('*').css("display","none");
jQuery('[name=submitForm]').click();
}
});
</script>
If the above script does not work, here is an alternative script you can try:
<script> jQuery().ready(function(){ jQuery('body').css("display","none"); setTimeout(function() {jQuery('#submitForm').click();}, 200); }); </script>
Creating a Custom HTML Section and placing it on your Form
- Navigate to Plan > Forms > Select your Form > Custom HTML.
- Click Add New.
- Copy and paste the script above into the Text Above Header field, enter a Section Name (e.g. Custom HTML Remove Blank Page), and click Save.
- Navigate to Plan > Forms > Select your Form > Logic, create a Label (e.g. Remove blank page), and click Save.
- Click Add New to create a new Logic Rule.
- Under List Rule Details, enter a Name (e.g. Custom HTML), and select the proper Section.
- Under Actions, select Display Custom HTML Sections and the Custom HTML Block you created, based on the conditions you applied.
- Navigate to Plan > Forms > Select your Form > Setup, place the Logic Rule in the Online Form Sequence, and click Save.
Comments
5 comments
Good job, Chris!
So happy I checked this page. Works perfectly!
Yes, this works like a charm and is well coded! Great work Chris!
Amazing!
I used it in a custom HTML section and it worked great, thanks!
Please sign in to leave a comment.