form input type="text" adding inputs as filled

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vin_akleh
Forum Commoner
Posts: 53
Joined: Sat Feb 14, 2009 10:26 am

form input type="text" adding inputs as filled

Post 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.
:?: :?: :?: :?: :!: :!: :roll:
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: form input type="text" adding inputs as filled

Post by Benjamin »

vin_akleh wrote: :?: :?: :?: :?: :!: :!: :roll:
What is that all about?
JasonDFR
Forum Commoner
Posts: 40
Joined: Wed Jan 07, 2009 3:51 am

Re: form input type="text" adding inputs as filled

Post by JasonDFR »

astions wrote:
vin_akleh wrote: :?: :?: :?: :?: :!: :!: :roll:
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.
vin_akleh
Forum Commoner
Posts: 53
Joined: Sat Feb 14, 2009 10:26 am

Re: form input type="text" adding inputs as filled

Post 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
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: form input type="text" adding inputs as filled

Post 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:
  1. General Posting Guidelines
  2. Posting Code in the Forums
  3. PHP Manual
  4. PHP Tutorials
JasonDFR
Forum Commoner
Posts: 40
Joined: Wed Jan 07, 2009 3:51 am

Re: form input type="text" adding inputs as filled

Post 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.
User avatar
..::Behzad::..
Forum Newbie
Posts: 7
Joined: Mon Mar 09, 2009 4:40 am
Location: Tehran, Iran
Contact:

Re: form input type="text" adding inputs as filled

Post 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.
Post Reply