How to jump to form pages depending on the selected options

This area is devoted to Magento Form Builder SmartFormer Gold. Please ask questions, report bugs and share ideas here.

How to jump to form pages depending on the selected options

Postby IToris team » Tue Jan 10, 2012 3:54 pm

Customer should be redirected to the different pages depending on selected option

For example you have drop-down on the first page of your form with name=dd. This drop down has the following select-list:

Code: Select all
0|-- Please select --
1|Page 2
2|Page 3
3|Page 4




Please open Tools – PHP editor and add the following code after $form->doAfterSubmitAction();



Code: Select all
if ($form->page == 1 && $form->submitter !== -1) {
              switch ($form->data['dd']) {
                    case '1' : $form->page = 1; break;
                    case '2' : $form->page = 2; break;
                    case '3' : $form->page = 3; break;
                    }
}


Save the changes.

If customer selects "Page 2" from select list then he will be redirected to the second page; if customer selects "Page 3" from select list then he will be redirected to the third page and etc.
IToris team
Site Admin
 
Posts: 1355
Joined: Mon Jan 19, 2009 12:33 pm

Return to SmartFormer Gold for Magento

Who is online

Users browsing this forum: No registered users and 1 guest