Re: help with form design
| From: | Maxwell Hung | Date: | Fri, 19 May 2000 17:16:49 +0000 |
| Subject: | Re: help with form design | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-207@lists.php.net to get a copy of this message | ||
If the options are always going to the same
you can just create a multiple select box in your form
ie.
<select name="select" size="1" multiple>
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
</select>
and pass the $select as an array. I'm not sure if you
have to alter something in this you may have to search
the archives. I've never had the need to use it.
If you're using the form in various places and it will
change you can create a table with the options then do
a query and output the results into a select box like
above or just make it into a function.
remember to hold control when selecting more than one
box.
M@
--- Chuck Barnett <cbarnett@netcabtec.com> wrote: >
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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/