• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Problem with conditional pages - can any help with

Problem with conditional pages - can any help with 8 years 11 months ago #35154

  • spinfx
  • spinfx's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hi

I have read the article on this subject, but do not understand how to code a solution to meet my needs". :unsure:

This is what I need to do:

I have a dropdown list with numbers 1-6 for selection as the answer to "How many passengers are in your party?"

When passengers = 1, show next page then jump to last page (This would be the default)
When passengers = 2, show next 2 pages then jump to last page
and so on, until
When passengers = 6, show next 6 pages then last page

Each page has "Next and Prev" buttons (except page 1 which only has "Next") and the pages consist of:

Page 1 contains the main contact details and preliminary questions.
Pages 2-7 contain duplicate sets of fields requesting information on up to 6 passengers.
Page 8 contains a set of global questions and the submit button.

The logic is straight forward but I just don't know how to code it.

I'd really appreciate some help with this.

Regards, David
The administrator has disabled public write access.

Problem with conditional pages - can any help with 8 years 10 months ago #35200

  • donaldbmoore
  • donaldbmoore's Avatar
  • OFFLINE
  • Fresh Boarder
  • Where there is a will, there is a way!
  • Posts: 5
If you take a look at the front end of the multi page form that comes with RSForms Pro you will find the onclick events for the next and previous buttons. You can just replace the page breaks with basic buttons and in the additional attributes write in the onclick function like this:
onclick="rsfp_changePage(2, 1, 2, 0)"

You will need to make one of these buttons for each selection, in your case you have 6 values so you will need to create 6 buttons. Then you'll need to remove those page breaks from the layout generation but don't delete them from the form components area because you'll bugger up the scripting needed to hide the pages. After this you'll need to create some conditional rules for each of the values to hide or show the correct buttons for each page.

I hope this helps!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!