Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    92
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Change a form based on previous input

    I was wondering if it's possible in PHP to make it so that once a user selects a certain option in a list, it makes the next input for that form change to either a textfield or a list without losing the values entered in the inputs above.

    I know PHP is a server-side script, does that make this not possible?

    Thanks.

  • #2
    New Coder
    Join Date
    Aug 2008
    Posts
    90
    Thanks
    5
    Thanked 3 Times in 3 Posts
    Hey,

    Yes, with server-side languages, it should be impossible to do that.
    What you need is javascript. If you also need to do something with the server in the form you can combine javascript and php with ajax. If you post this on the ajax forum, you should get more results.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •