How to create a kiosk mode for your page

When a user signs up on a NationBuilder page, they remain logged-in so they can continue to interact with the website, submit forms, and take other actions without having to supply the same information every time.

This is great for reducing form-fatigue on normal sign-up pages, but can present problems when trying to have multiple people sign-up in rapid succession through one or two devices (e.g. Checking-in attendees at an event, collecting petition signatures, taking donations, etc).

You can create a "kiosk mode" for your nation's sign up pages using a bit of Liquid and Javascript to log users out automatically after taking the action on the page.

1. Select a page you want to use for your "kiosk mode."

2. Go to the page template. You want this to apply to a single page, so make sure you're editing the page-level template and not the theme-level template.

Page template

3. Add the following code on line 1 of your template:

It will look like this:

Snippet on first line

Add this to the last line of your template:

It will look like this:

Snippet last line

4. Click Save and publish. Your kiosk mode is live.

This snippet first checks to see if the user is logged in or not. If they're not logged in, they'll see the form as usual. If they are logged in (e.g. they just signed up), the user will be automatically logged out and forwarded back to the same sign up page. This allows a new person to sign-up without overwriting the previous person's submitted information.

You can change the amount of time spent on the page before the user is automatically logged out. Time is listed in ms, so if you wanted to extend the time to 4 seconds, you would enter 4000 instead of 3000 on line 6 of the first snippet.

To remove kiosk mode from your page, delete the snippets from your template and click Save and publish.

If you’re unclear on how this feature works, please ask a question. If you would like to see changes to this feature, please submit a suggestion.