[desc]: I currently have a multi-page form … let's say it's about cats and dogs. The first page of the form has one select box that allows users to choose "cats" or "dogs" before moving to the second page for the form. I would like to send people that choose "cats" to a "cats" oriented page two and people who choose dogs to a "dogs" oriented page two. Essentially the goal is to dynamically choose page one of two already set up page twos of the form based on the choice between "cat" and "dog" on the page 1 select box.
How would I accomplish this? Would I edit my page 1 select box that has "cats" and "dogs" as its options to give them specific values or is there another way to do this?
1- First form is part of a mult page form and has a drop down box that has 4 options and all send user to page 2 of form by default. I would like to redirect users if "Home Purchase" is chosen from select box called "Types of Loan"
2- I have created an alternative page 2 to be used when "Home Purchase" is chosen from type of loan select box
After running email fuction you gave in related post, I determined the html id of the field in question is 3:
[$$$3] => Type of Loan [Type of Loan] => Home Purchase
3- I have uncommented lines 36 – 122 in my-functions.php and now have the following (cnn.com is only used for testing) with $$$mypick replaced with html id of 3
*********************
if ( $setting == "redirection" ){
### note: '$$$mypick' references the ID of the HTML element and has been assigned ### to the drop down field in the form configuration, with [id:mypick] !
Thanks for the response. From reading the nextForm verbiage, it appears as though there is a "extended option checkbox" involved? I think I'm missing something…
The default page two of our multi-page form is Form #4, our goal is to redirect to an alternative page two that happens to be Form #7 when a user chooses the option "Home Purchase" from our "Type of Loan" select box in the form. The form is here for reference: http://bit.ly/P3gdp
I'm not quite sure what we should or shouldn't be doing at this point… any feedback appreciated!
#######################
### example: changes the next form to be form ID 5 (which is multi form page enabled)
if ( $setting == "nextForm" ){
### the below only triggers when the configured "next form" would have been 4 ### and the user did not check extended option checkbox if ( $oldvalue=='4' && $cformsdata['data']['extended options']=='on' ) return 7;
Thanks! It looks like my criteria need to be fine tuned.
Goal: Have the page 2 next form change from default form (Form 4) to Form 7 when "Purchase" is chosen from the "Type of Loan" select box.
The expression I have below partially works. Instead of only changing the next page form when the criteria "Purchase" is selected from "Type of Loan", the form is diverted to Form 7 regardless of what option is chosen from "Type of Loan" select box, in short, the form diverts to Form 7 regardless of what options in select box are chosen, the default Form 4 is completely bypassed.
Oddly enough, I wanted to double check my field parameter of $$$3 but the email field function sends blank emails… for whatever reason…it previoiusly sent
Array ( [id] => 3 [data] => Array ( [$$$1] => Fieldset1 [Fieldset1] => Get a Fast Rate Quote! [$$$2] => Fieldset2 [Fieldset2] => Fast Quote [$$$3] => Type of Loan [Type of Loan] => Home Purchase [$$$4] => Home Description [Home Description] => Single Family [$$$5] => Your Credit Profile [Your Credit Profile] => Excellent )
)
Any idea on what I'm leaving out????? Thanks for your feedback!
Current Code:
*****************************
### example: changes the next form to be form ID 5 (which is multi form page enabled)
if ( $setting == "nextForm" ){
### the below only triggers when the configured "next form" would have been 4 ### and the user did not check extended option checkbox if ( $oldvalue=='4' && $userfield = $cformsdata['data'][$cformsdata['data']['$$$3']] ) return 7;
I don't mean to be daft, but I don't know what the expression should look like, that's the problem. I have tried what you gave me above, but it didn't work for me…
if ( $setting == "nextForm" ){ $userfield = $cformsdata['data'][$cformsdata['data']['$$$3']];
if ( $oldvalue=='4' && $userfield == 'Home Purchase' )
return 7; else
return $oldvalue;
}
…
the red simply assigns the user choice to a $variable, the IF checks if you're on the form that points to form '4' (by default) as the 'next form' and IF the user chooses Home Purchase returns "7" as the next form.
Yeah, that is what I tried first based on your previous response and it doesn't seem to send the person to form 7 when Home Purchase is chosen…. that's why I was confused… hmmmm. Not sure what else to try…