RE: help with form design
| From: | Ted Knudson | Date: | Fri, 19 May 2000 19:10:37 +0000 |
| Subject: | RE: help with form design | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221@lists.php.net to get a copy of this message | ||
You can do this two ways, Client side or server side.
Client side use Java Script. You will find examples at Java Script sites.
Server Side:
<?php
if(Submit == "add another"){$Count =$Count +1;}
Switch(AddFields){
Case "1"
code to add another field
Case "2"
Code to add two fields or another field. You will have to play with this.
Case "etc"
}
?>
Ted Knudson
http://www.automatedcabinets.com
http://www.pulsarusa.com
> -----Original Message-----
> From: Chuck Barnett [mailto:cbarnett@netcabtec.com]
> Sent: Friday, May 19, 2000 10:02 AM
> To: 'php-general@lists.php.net'
> Subject: help with form design
>
>
> Hello people. I am building a site that will present a form for the user
> to fill out and then store the info in a db. The current paper based
> form is relatively simple, but the key bad thing is this:
> there could be multiple answers for one particular question.
>
> instead of having just 5 text input boxes, I will need a way to "add
> more". One way I have thought of doing this is filling the form out in
> stages. Fill out the stuff with one answer and when you get to the end
> of that section, click "next". The user would then get a chance to fill
> out a form with the data that may have multiple answers. The user could
> then click "next", "finished", or "add another".
>
> This method is not clean. I would like a way to just have the entire
> form on the screen and to dynamically add the "multipel answers".
>
> current thinking says that I will have separate tables for each of the
> "multiple answers"
>
> if anyone has a suggestion I am open.
>
> chuck
>