The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Multiple Forms on single page using FT2 API - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17) +--- Thread: Multiple Forms on single page using FT2 API (/showthread.php?tid=577) |
Multiple Forms on single page using FT2 API - fourmat - Mar 16th, 2010 Hi Guys, Great script. I am using it in several places and find it really easy to use. I have currently run into a situation where we need to have several forms on the same page. I have searched through the forums and found where others have added more than one to a single page, but they were custom coding a lot of additional features. Basically, my client wants 3 forms on the same page that are hidden with a display:none DIV tag. When a link is chosen and clicked the DIV opens and the form shows up leaving the others hidden. How would one go about utilizing the API to handle more than one form on a single page just using the standard coding provided in the base FT installation instructions? My apologies if I missed the instructions somewhere, I looked but couldn't find anything. RE: Multiple Forms on single page using FT2 API - martin_undefined - Mar 16th, 2010 (Mar 16th, 2010, 6:07 AM)fourmat Wrote: Hi Guys, Hi, Someone was just asking about this recently and it can be done see 'namespace' and this thread http://forums.formtools.org/showthread.php?tid=544 RE: Multiple Forms on single page using FT2 API - fourmat - Mar 22nd, 2010 ok, I see that the namespace variable will allow me to put 2 on the same page, but: 1) how do I handle the code if I want each form to have a different thank you page. 2) If I want to have the fields validated, how can I have one set of fields validated on one form, and another set on another with the rsv.js script? Thanks for the help. RE: Multiple Forms on single page using FT2 API - martin_undefined - Mar 22nd, 2010 (Mar 22nd, 2010, 11:24 AM)fourmat Wrote: ok, I see that the namespace variable will allow me to put 2 on the same page, but: If you look at the example referred to above, each form is defining it's own thankyou page. Quote:2) If I want to have the fields validated, how can I have one set of fields validated on one form, and another set on another with the rsv.js script? Not entirely sure but I would imagine you could use a hidden value and some if then logic to assign which rules script is used. Hope that helps. |