Shawn McKenzie wrote:
I have a script with $_POST and <form> to load data with text input.
Situation: enter name of author(s) for book. I have the script set up to
enter first_name, last_name for Author1 and the same for Author 2.
Check if entry 1 exists then proceed accordingly
Check if entry 2 exists then proceed accordingly.
Now, If I have three or more authors to enter, is there a way to add a
radio button to add more rows for input or to skip further inputs, if I
have to enter the inputs for each additional author?
I'm looking for a simple way to do this. Could or should Ajax be
involved in this somehow?
Ajax would be a good way to go if it could be an undetermined number of
authors. But if you have a limit (like 3 or 4 or 5) then just include
the text fields for that number.
For Ajax you might have a button or link that says "add more authors"
AJAX - http://en.wikipedia.org/wiki/Ajax_(programming)
Dynamic Form Generation -
I did a quick Google and came up with the two above examples. Others might have better suggestions.
asking without ever needing to talk with the server. So it doesn't involve anything that AJAX was
designed to solve.
I simply wanted to point out the different uses. Hope I didn't step on
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php