Try looking for javascript solutions. Give them the default 5 and a javascript
function that prints out another input variable and dynamically names it. Then
you can just normally post at the end. i don't think the javascript is difficult
either, and i'm sure you could find a script for it. check dynamicdrive.com
hotscripts.com and google.
Jack
Chris Bailey wrote:
> I have a page that is for a little recipe database app. On the page where
> you enter your recipe, there is a set of form fields for ingredients - one
> line per ingredient, and a couple of fields per (e.g. amount, measurement,
> ingredient).
>
> I'd like to have say 5-10 ingredient lines in the form by default, but put
> an "Add More" button next to the last one that will let the user say add 5
> more ingredient lines to the form. How can I do this?
>
> The problem for me is that I figure I'd want the Add More button to either
> do a POST to the same page (and add a parameter indicating the number of
> ingredient lines to use or something like that), but that the standard form
> Submit/Add Recipe button would go to a different PHP page that actually
> inserted the recipe into the database. But, this requires two forms and
> thus I'd lose the recipe's form variables when hitting one or the other of
> the buttons.
>
> I've looked around online for solutions to this, but haven't found any. Can
> someone point me in the right direction?
>
> ____
> Chris Bailey mailto:[EMAIL PROTECTED]
> Code Intensity http://www.codeintensity.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]