SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript, add new field to form

    I am looking for some example code for a form, when a user selects from a drop down menu the "other" option, a new field appears below AND the drop down menu gets locked.

    Really would be helpful if i could get some ideas.. !

    Cheers!!

  2. #2
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    .. not really what i was looking for.. i want to be able to add a new field and also block the user from using the drop down menu.. for example if they select "other" in the drop down menu a new field appears and the drop down can not be changed unless the "other" option is unselected...

    this is very common function, but im new to javascript soo i really need a helping hand..

  4. #4
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    One question. How would you unselect "other" if you've locked the dropdown?
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok that wouldnt exactly work..

    I was thinking more like if someone clicks "other" then a new field below is created for the other option...


Bookmarks

Posting Permissions

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