Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using variables in questionairre to determine next page

Featured Replies

This may just be a JavaScript solution (though I still am unsure of how to proceed), but here's what's going on:

 

I'm trying to create a simple 2 question questionnaire that sends the visitor to a page dependent on their answers. Here's the jist of it.

 

Question 1: What type of company are you?

Type 1

Type 2

Type 3

Type 4

 

Question 2: What is your company's annual revenue?

Revenue 1

Revenue 2

Revenue 3

Revenue 4

 

 

What I'm looking for is to create a simple form using radial buttons, where whichever option the visitor chose determines what site next displays when they click a Next button. I plan to have Question 1 on its own page, since certain Types of companies (let's say a non-profit company) would exclude certain annual Revenue options (say $10 billion or more). So if a visitor chose Non-Profit for Question 1, then clicked Next, the next page would display with only the viable options for Question 2. So basically I'd be creating multiple versions of a page containing Question 2, and whichever option the visitor selected in Question 1 would determine which page was displayed next.

 

Similarly, whichever of the displayed options the visitor selects for Question 2 then determines the page they finally land on when they hit Next.

 

I know it may be possible to display both questions on the same page, with the radial chosen for Question 1 determining the displayed answers for Question 2, but I have no idea how to do this. Honestly, whichever is a faster result is preferred (deadlines and all).

 

If anyone can help me do this, I would be forever grateful. Thank you in advance. :)

  • Author

Just an update:

 

I managed to sort of do this, using a modified version of a script I found. You can see what I ended up doing, in action, here. Feel free to browse the source.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.