Form Validation - Can this be done?

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Form Validation - Can this be done?

    I have a form with several dropdown menus.
    One dropdown menu has two options yes - no
    Depending on which option is selected, i want the following 'text' field to
    either be greyed out (if 'no' is selected) or editable (if 'yes' is
    selected).
    Can this be done and if so, how?

    Thanks
    Andy


    Andy Guest

  2. Similar Questions and Discussions

    1. CFFORM Validation trumping Custom Form Validation
      Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two...
    2. Form Validation
      Hi all, I am using form validation to authenticate users. In the web config file I secure a page that has only the following statement:...
    3. form validation in asp.net
      I want to verify that a email has been entered in a simple asp.net form that is being sent as an email. I found the RequiredFieldValidator Tag is...
    4. copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?
      I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed...
    5. get rid of form validation
      I added form validation in MX and then deleted some form fields, so needed to change the validation behavior. I deleted the On blur from the...
  3. #2

    Default Re: Form Validation - Can this be done?

    Yes it can, on the select form field, add:

    onChange="document.getElementById('field1').disabl ed=(this.selectedIndex==0)?'':'disabled'"

    Now, this will disable the field and any text in it becomes gray, and,
    depending on the browser, some borders become gray - to take it further
    you would need to assign some CSS changes as well (which is a little
    more complex)

    Paul Davis
    [url]http://www.kaosweaver.com/[/url]
    Visit us for dozens of useful Dreamweaver Extensions.

    [url]http://www.communitymx.com/[/url]
    Partner at Community MX - Extend your knowledge

    Andy wrote:
    > I have a form with several dropdown menus.
    > One dropdown menu has two options yes - no
    > Depending on which option is selected, i want the following 'text' field to
    > either be greyed out (if 'no' is selected) or editable (if 'yes' is
    > selected).
    > Can this be done and if so, how?
    >
    > Thanks
    > Andy
    >
    >
    Paul Davis Guest

  4. #3

    Default Re: Form Validation - Can this be done?

    Excellent Paul, I will try it - Thank you very much

    Andy


    "Paul Davis" <kaosNOweaver@kaosSPAMweaver.com> wrote in message
    news:ftijsu$qq$1@forums.macromedia.com...
    > Yes it can, on the select form field, add:
    >
    > onChange="document.getElementById('field1').disabl ed=(this.selectedIndex==0)?'':'disabled'"
    >
    > Now, this will disable the field and any text in it becomes gray, and,
    > depending on the browser, some borders become gray - to take it further
    > you would need to assign some CSS changes as well (which is a little more
    > complex)
    >
    > Paul Davis
    > [url]http://www.kaosweaver.com/[/url]
    > Visit us for dozens of useful Dreamweaver Extensions.
    >
    > [url]http://www.communitymx.com/[/url]
    > Partner at Community MX - Extend your knowledge
    >
    > Andy wrote:
    >> I have a form with several dropdown menus.
    >> One dropdown menu has two options yes - no
    >> Depending on which option is selected, i want the following 'text' field
    >> to either be greyed out (if 'no' is selected) or editable (if 'yes' is
    >> selected).
    >> Can this be done and if so, how?
    >>
    >> Thanks
    >> Andy
    >>
    Andy Guest

  5. #4

    Default Re: Form Validation - Can this be done?

    question and help needed I purchased cs3 this morning because need to be able
    to do more and great excuse to upgade but that aside would spy be the best to
    use to validate drop down menu we have validated all other fields with beviuors
    but not showing drop down as a feild to modify so in you oppinions would spry
    be best and were would i find the steps I have read lots of information and
    search out even more however still no luck with this what advice do you
    have.... Again many thanks in advance as I beleave you all have the knowladge
    and skill to send me in the right direction

    aja183 Guest

  6. #5

    Default Re: Form Validation - Can this be done?

    Hi all
    wondering if anyone is awake

    sorry just we are in oz so i expect the time dif is my chalange however if anyone in on maybe they could say hi...... or in my case Giday
    aja183 Guest

  7. #6

    Default Re: Form Validation - Can this be done?

    Yes, you can have the color change when you clikc the required button in the validation form.
    Brian Wright_ Guest

  8. #7

    Default Re: Form Validation - Can this be done?

    Hi Paul
    Just tried your code and it does disable the text box no matter what was
    selected from the previous dropdown.
    How do i get the code to only disable the text box if the dropdown has a
    particular vaue? i.e. "no"
    it would also be great if you could point me in the right direction
    regarding the use of css to grey the text box out.
    Much Appreciated.
    Andy



    "Paul Davis" <kaosNOweaver@kaosSPAMweaver.com> wrote in message
    news:ftijsu$qq$1@forums.macromedia.com...
    > Yes it can, on the select form field, add:
    >
    > onChange="document.getElementById('field1').disabl ed=(this.selectedIndex==0)?'':'disabled'"
    >
    > Now, this will disable the field and any text in it becomes gray, and,
    > depending on the browser, some borders become gray - to take it further
    > you would need to assign some CSS changes as well (which is a little more
    > complex)
    >
    > Paul Davis
    > [url]http://www.kaosweaver.com/[/url]
    > Visit us for dozens of useful Dreamweaver Extensions.
    >
    > [url]http://www.communitymx.com/[/url]
    > Partner at Community MX - Extend your knowledge
    >
    > Andy wrote:
    >> I have a form with several dropdown menus.
    >> One dropdown menu has two options yes - no
    >> Depending on which option is selected, i want the following 'text' field
    >> to either be greyed out (if 'no' is selected) or editable (if 'yes' is
    >> selected).
    >> Can this be done and if so, how?
    >>
    >> Thanks
    >> Andy
    >>
    Andy Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139