TOPIC:

Skip a page 9 years 3 weeks ago #96937

  • Topic Author
  • adamsgj
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 0
I'm developing a 3 page quickmode form ~ page 1 is personal details, page 2 is vessel details and page 3 is finalisation before submission.

At the bottom of page 1 I have a radio group names Membership_Type to indicate the type required. If the user selects either of the "no boat" options then I want to skip page 2 and go to page 3.

Is this achievable and, if so, how please?
Attachments:

Please Log in or Create an account to join the conversation.

Skip a page 9 years 2 weeks ago #97003

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10062
  • Karma: 167
  • Thanks: 809
Hi,

of course, please go to the group setup => advanced tab => action script => click "custom" => check "change" => click "create code framework" => inside the generated function, right after "case 'change':", add this:
var group = document.getElementsByName(element.name);

for(var i = 0; i < group.length; i++) {
   if(group[i].checked == true) {
       switch(group[i].value){
             case 'Family (no boat)': ff_switchpage(2); break;
             case 'Single (no boat)': ff_switchpage(3); break;
       }
   }
 }

That would switch pages based on what has been checked. Please note that the values "Family (no boat)'" are coming from the value part of your group definition, so you need to change it accordingly if it differs.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Skip a page 9 years 2 weeks ago #97056

  • Topic Author
  • adamsgj
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 0
I tried this but it doesn't want to work ~ still goes to page 2 for "no boat" selections. The values in the radio group are the same as the labels and appear correct in the case statement. Settings attached.

Here is the full code:

function ff_Membership_Type_action(element, action)
{
switch (action) {
case 'focus':
var group = document.getElementsByName(element.name);
for(var i = 0; i < group.length; i++) {
if(group.checked == true) {
switch(group.value){
case 'Family (no boat)': ff_switchpage(2); break;
case 'Single (no boat)': ff_switchpage(3); break;
}
}
}
default:;
} // switch
} // ff_Membership_Type_action
Attachments:

Please Log in or Create an account to join the conversation.

Skip a page 9 years 2 weeks ago #97058

  • Topic Author
  • adamsgj
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 0
Don't worry thanks ~ I figured it out (wrong action type checked). Also first switchpage should be (3).

Please Log in or Create an account to join the conversation.

Skip a page 9 years 2 weeks ago #97284

  • Topic Author
  • adamsgj
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 0
I've turned on field validation and now the next button is not working and no messages (note also the malformed button image). I had expected that next would perform all page validation then take me to the next page being page 2 for members with vessels or page 3 for members with no vessels. It seemed to advance OK when no validation had been set. Next on page 2 also isn't working. I like this product and will buy the full version if I get get the form to work properly ~ the previous forms builder doesn't work well enough for our purposes but this shows promise.

URL is vmrdev.vmrbribie.com/index.php?option=co...view=form&Itemid=263 if you need to look.

Thanks
Attachments:

Please Log in or Create an account to join the conversation.

Skip a page 9 years 2 weeks ago #97320

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10062
  • Karma: 167
  • Thanks: 809
did you add some custom scripts there else than the above? I get a javascript error on the page that causes that behavior.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.051 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!