How to Remove a Blank Page Generated by Logic

Certain skips a form page on its own when nothing on it would show. When working with logic, a blank page can appear when the page has hidden content. When the registrant should see the page, but the logic triggers/conditions were not met, the registrant sees a blank page.

What causes it

A section with a display condition is different. If a registrant does not meet a section's display condition and nothing else is on that page, Certain skips the page.

Check these first

1. Find the page. Register a test attendee who matches the people seeing the blank page. Note which page is blank. 2. See which sections are on that page. Edit the form and click Setup in the left menu. Under Page Layout, look at the Online Form Sequence. Pages are separated by <{Secure Page}> lines. 3. Check each question's Show online setting. Go to Plan > Event Setup > Questions and open each question in those sections. Under Display Settings, if Show online? is No or Hidden for all of the questions, the page has nothing to show. Change at least one question to Optional or Require, or take the section off the form. 4. If the section should show only to some people, give it a display condition. On the form's Questions page, open the section and set Display ONLY if these conditions are met. People who do not match then skip the page. To leave out one or more answers to a multiple choice question, use is not one of. does not contain is meant for text. 5. Test again with one registrant who should see the page and one who should not.

See Why isn't my question showing on my registration form? for more on what hides a question.

If the page still comes up blank: skip it with a script

A script can submit the empty page for the registrant, so registrants go straight to the next page. On a page that has a question to answer, the first script below does nothing.

> Test before you go live: A script changes how your form behaves. Add the script while the form is in Testing status and register test attendees down every path. If you would rather not add a script yourself, contact Certain Support and they can add it for you.

Script that submits the page when it has no fields to fill in

<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>

Alternative script that submits the page every time it shows

<script> jQuery().ready(function(){ jQuery('body').css("display","none"); setTimeout(function() {jQuery('#submitForm').click();}, 200); }); </script>

Add the script to your form

The script needs two things: a Custom HTML section placed on the blank page, and a logic rule that shows it. One without the other does not work.

1. Create a Custom HTML section. Go to Plan > Forms, edit the form, and click Custom HTML in the left menu. Click Add New. Enter a Section Name (for example, "Skip blank page"), paste the script into Text Above Header, and click Save. 2. Put it on the blank page. Click Setup. Under Page Layout, move your new section from Available Sections into the Online Form Sequence, on the same page as the section that comes up blank. Click Save. 3. Create a logic rule that shows it. Click Logic. Click Add New. Enter a Name, pick a Section (such as Logic 1), and set Conditions to match the people who would see the blank page (or Always apply for the first script). Under Actions, choose Display Custom HTML Sections and pick your section. Click Save. 4. Place the logic section. On Setup, move the logic section (such as Logic 1) into the Online Form Sequence on an earlier page than the blank one, after any questions its conditions check. Click Save. See Logic rules: what they can't do, and why one won't save 5. Test it. Register a test attendee who used to see the blank page, and one who did not.

The form opens on the wrong page or loops

Existing registrations open on the Verify page

That's the default. To start them at the beginning, turn on Always land existing registrations at beginning of form sequence under Form > Setup > Settings.

The form loops back to page one

An extra Secure Page in the Online Form Sequence can send registrants back to the start. Remove the extra Secure Page.

The form or website won't show at all

Each event needs one primary form. Turn on This is the primary form for the event on the form you use most.

Next step

Start with the Show online setting of the questions on the blank page. Most blank pages go away once one question can show.

Source: https://platform-support.certain.com/hc/en-us/articles/200653690-How-to-Remove-a-Blank-Page-Generated-by-Logic

Published:

Keywords: Certain, blank page, logic rule, Custom HTML, JavaScript