lional Posted November 1, 2006 Share Posted November 1, 2006 Hi all,I am trying to create a form that will only display one line at a time, and when the user presses the enter key, a new line will appear if the previous one is completed.I have name. address, phone number one one line.Is there any way in php to accomplish thisThanksLional Link to comment https://forums.phpfreaks.com/topic/25819-help-with-forms/ Share on other sites More sharing options...
Gruzin Posted November 1, 2006 Share Posted November 1, 2006 you could use something like this:[code]<?phpif(isset($_POST['action'])){echo "some field here";}?>[/code] Link to comment https://forums.phpfreaks.com/topic/25819-help-with-forms/#findComment-117899 Share on other sites More sharing options...
gmwebs Posted November 1, 2006 Share Posted November 1, 2006 If you use PHP like Gruzin suggested, then you would have to POST the form each time the enter key is pressed (or submit button is clicked), and then the page would be reloaded to display the next stage, but I guess that answers your question on how to do it in PHP.However, providing you don't have accessibility issues with using JavaScript, then this is what you should consider using, as you would be able to update the form in realtime. PHP is a server side language, and you want to control what the client sees, which is more suited to a client side language like JavaScript. Link to comment https://forums.phpfreaks.com/topic/25819-help-with-forms/#findComment-117904 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.