This is a discussion on "Hiding / Showing form fields based on previous form input" within the PHP Forum section. This forum, and the thread "Hiding / Showing form fields based on previous form input are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Hiding / Showing form fields based on previous form input
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Hello again
Another poser for you... I've got a multi-page form, with the information from the previous page stored in hidden values, then everything is submitted on the final page. Trouble is, certain fields are only applicable to either male or female members. I'm using Dreamweaver 8, and I know how to show and hide information based on the arguments in Recordsets. But, as the information from their signup (including their gender) is stored in hidden form fields - and not yet in the Database (where Recordsets look), how can I make a certain form question show up to only people who have given their gender as 'Female' on the previous page for example? Many thanks in advance John |
|
|
|
||||
|
Re: Hiding / Showing form fields based on previous form input
If the variable is "hidden" it is still available. Just do an
You don't need to "hide" anything - you can just not write it; since you've harnassed the power of PHP, the page is generated and you can use any information passed to the page as a switch to generate or not generate output. You could also set a cookie or a session variable if you want to use gender on a page where the POST variables haven't been passed. And if you're learning PHP, maybe I can even convince you to kick off the Dreamweaver training wheels Last edited by masonbarge; Mar 10th, 2008 at 11:33. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with form validation and required fields | tbathgate | JavaScript Forum | 5 | Feb 27th, 2008 22:01 |
| HTML form fields | jasonjkd | Web Page Design | 2 | Oct 15th, 2007 21:58 |
| Form Fields | robukni | PHP Forum | 7 | Oct 10th, 2007 20:26 |
| Form fields hidden under images | dangergeek | Web Page Design | 5 | Sep 3rd, 2007 13:23 |
| Form fields Edit Mask | StanLevin | JavaScript Forum | 0 | Aug 20th, 2007 21:33 |