Results 1 to 2 of 2

Thread: Dynamically add a form field?

  1. #1
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default Dynamically add a form field?

    I have a form that I would like to become dynamic. Here's the form:

    http://alexjewell2.com/clients/quinn/apform.php

    It's for a client who is an artist to add an art piece. Where I'd like to add a dynamic element is the Medium field: I'd like an input to show up next to the drop-down list if "other" is selected in that list.

    Any ideas or resources?
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  2. #2
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Nevermind - figured it out. I came up with this script:

    Code:
    function mediumOther(theForm){
    	show = document.getElementById('other_input');
    	if (theForm.medium.value=='Other'){
    		show.style.display='inline';}
    	else{
    		show.style.display='none';}
    }
    If you have any suggestions, let me know...but it works well. Thanks.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

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
  •