
December 30th, 2012, 04:52 AM
|
 |
Known to taste like chicken
|
|
Join Date: Aug 2003
Location: In front of my computer
|
|
not a php question from what I can tell. You would need to use javascript for this.
I think what you are saying is that you want a user to be able to click the button and it adds another field each time they click it? so click it once get 1 field, click it again get a second field etc etc?
if so you would do something like
Code:
document.getElementById('containerDivId').innerHTML += "<input type=\"text\" name\"blah\" id=\"blah\">";
take that code with a grain of salt it's only an example and I'm no javascript expert. Also that would only add the input at the end of the div, so it would be after the </form> tag etc, so more would be needed to achieve what you want, but that's the gist of what you would need.
Maybe a mod could move this thread to the JS forum where you will get more love?
__________________
"Take thy beak from out my heart, and take thy form from off my door" - Homer J Simpson / Edgar Allan Poe
Looking for a project Idea?
Last edited by sir_drinxalot : December 30th, 2012 at 04:55 AM.
|