Page 1 of 1
form input type="text" adding inputs as filled
Posted: Fri Mar 13, 2009 8:46 pm
by vin_akleh
can any body help me how to add input text as filled
what i mean is like this:
1 input text
when the 1st input text is filled a second one shows up
when the 1st and the 2nd one is filled a 3rd input text shows up
just like that N times until the user clicks submit.

Re: form input type="text" adding inputs as filled
Posted: Fri Mar 13, 2009 9:28 pm
by Benjamin
Re: form input type="text" adding inputs as filled
Posted: Sat Mar 14, 2009 10:21 am
by JasonDFR
astions wrote:
What is that all about?
Why does this forum allow smiles? Might be a better question. If the forum allows them, don't be surprised if people use them.
If I understand your question, you should use javascript to accomplish what you want to do. It could be done with PHP, but would be a lot more complicated. It would add work for server and http requests that could otherwise be avoided.
Go look in a forum that talks about javascript.
Good luck.
Re: form input type="text" adding inputs as filled
Posted: Sat Mar 14, 2009 5:45 pm
by vin_akleh
there is nothing wrong with smileys
why do u people insist on java script i have posted this thread to know how to do this in PHP pleas.
so pleas do not write unnecessary replies pleas.
thank u
Re: form input type="text" adding inputs as filled
Posted: Sat Mar 14, 2009 5:49 pm
by Benjamin
Forum Rules wrote:
11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
You may also want to read:
- General Posting Guidelines
- Posting Code in the Forums
- PHP Manual
- PHP Tutorials
Re: form input type="text" adding inputs as filled
Posted: Sun Mar 15, 2009 3:03 am
by JasonDFR
I feel I was being helpful by telling you to use javascript. This is not something that should be done with php. That is why I insisted on using javascript.
when the 1st input text is filled a second one shows up
As written, this is impossible with PHP. The user will need to click a button to "Add another input" after they have filled in the first input. The form information would be sent to the server, processed, and sent back to the user with another input box added. This would occur N times until the user clicked submit.
Again, it is possible, and if this is what you would like to do, I'm willing to help. Get started yourseld and when you run into a problem, ask about it. I'm not going to write the whole script for you, but I'll try to help when you get stuck on something.
Let me know.
Re: form input type="text" adding inputs as filled
Posted: Sun Mar 15, 2009 3:41 am
by ..::Behzad::..
vin_akleh wrote:there is nothing wrong with smileys
why do u people insist on java script i have posted this thread to know how to do this in PHP pleas.
so pleas do not write unnecessary replies pleas.
thank u
php is a server-side language, and what you want is a client-side action. I agree with
JasonDFR because the only way to do this is using JavaScript.