The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
multi page dependency - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: multi page dependency (/showthread.php?tid=616) |
multi page dependency - Hannes - Mar 27th, 2010 I would like to add a multi page form whereby the second page depends on the input of the first page. For example on the first page I have a drop-down with "A" and "B". If "A" is selected it will continue with form A and if "B" is selectected it will continue with form B which is different from form A. How must the code look like? Thanks in advance and best regards, Hannes. RE: multi page dependency - Ben - Mar 28th, 2010 Hi Hannes, Sure, this can be done like this. At the top of your form, you should have something like this already there: PHP Code: $params = array( The "next_page" key lets the ft_api_process_form function know where to redirect the user to next. What you need to do is just construct the $params variable to have a different redirect page, depending on what was entered in the form. So something like this would work: PHP Code: if ($_POST["dropdown"] == "A") I've omitted all the stuff that'll be specific to your form, but that's the general idea. Hope this helps! - Ben RE: multi page dependency - Hannes - Apr 2nd, 2010 works like a charm... Thank you a lot for the detailed instructions! |