Professional Web Applications Themes

Yaromat Check Form - Value in at least one of multiplecheck boxes - Macromedia Exchange Dreamweaver Extensions

I need to force that at least one or more of multiple Check boxes be selected. Radio boxes can be set to any one selected and Yaromat Check Form can control that, but it does not seem to control that at least one or more of a set of Check Boxes are set. The checkboxes take this form: <input name="number" type="checkbox" id="number" value="1"> <input name="number" type="checkbox" id="number" value="2"> etc Any Ideas please? Chris Dart...

  1. #1

    Default Yaromat Check Form - Value in at least one of multiplecheck boxes

    I need to force that at least one or more of multiple Check boxes be selected.
    Radio boxes can be set to any one selected and Yaromat Check Form can control
    that, but it does not seem to control that at least one or more of a set of
    Check Boxes are set. The checkboxes take this form:
    <input name="number" type="checkbox" id="number" value="1">
    <input name="number" type="checkbox" id="number" value="2">
    etc

    Any Ideas please?

    Chris Dart

    Chris Dart Guest

  2. #2

    Default Re: Yaromat Check Form - Value in at least one of multiplecheck boxes

    This answer assumes you already have the Javascript on the page for validation with Yaromat.
    Find these two lines:

    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
    }

    BELOW IT add this:
    /* has to have at least one checkbox selected */
    /* NOTE: in this example each checkbox in my checkbox group is named STUDENT_NUMBER */
    var x = doent.getElementsByName("STUDENT_NUMBER");
    var okay=false;
    for (i = 0; i < x.length; i++)
    {
    var fld = x[i];
    if (fld.checked == true)
    {
    okay=true;
    break;
    } else {
    addErr=true
    }
    }
    /* add the error message for your checkboxes here. Of course, yours will be different. */
    if (!okay){myErr+='* Please select a STUDENT\n'; okay=false}

    /* The next lines are the very end of the function YY_checkform() function and should remain the same. Your checkbox code (above) must be added BEFORE this ending of the function */

    if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
    doent.MM_returnValue = (myErr=='');
    }
    */ this marks the end of the function YY_checkform() */


    Quote Originally Posted by Chris Dart View Post
    I need to force that at least one or more of multiple Check boxes be selected.
    Radio boxes can be set to any one selected and Yaromat Check Form can control
    that, but it does not seem to control that at least one or more of a set of
    Check Boxes are set. The checkboxes take this form:
    <input name="number" type="checkbox" id="number" value="1">
    <input name="number" type="checkbox" id="number" value="2">
    etc

    Any Ideas please?

    Chris Dart
    kdpowell Guest

Similar Threads

  1. PDF form check boxes not highlighting from page to page
    By Jane_Fender@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 0
    Last Post: May 11th, 01:44 AM
  2. Validate expiry date in Yaromat Check Form
    By Claire S in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: December 5th, 04:32 PM
  3. Yaromat Check Form MX
    By A1designer in forum Adobe Dreamweaver & Contribute
    Replies: 2
    Last Post: June 11th, 04:20 PM
  4. yaromat check form email validation
    By Scribe Network in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: June 10th, 03:04 AM
  5. Yaromat Form Validation
    By Netduo in forum Adobe Dreamweaver & Contribute
    Replies: 7
    Last Post: March 22nd, 07:17 PM

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
  •  

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