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

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

  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. Similar Questions and Discussions

    1. PDF form check boxes not highlighting from page to page
      Hello forum users > I have been creating editable PDF forms with Acrobat 7.0 and have come across an issue that I cannot solve. If you tab through...
    2. Validate expiry date in Yaromat Check Form
      I use Yaromat's Check Form extension on all of the forms I've created. On our secure payment forms, there are 2 select boxes - one for month and one...
    3. Yaromat Check Form MX
      I go through doing all the checking - tells me my (all) fields are invalid (what does that mean?). I have radio groups, and am telling all the...
    4. yaromat check form email validation
      I need to be sure that a valid email address has been submitted, but if the email address contains an underscore ( _ ), checkform considers this to...
    5. yaromat validate form
      Can't really help, except to say it works on my xppro using dwmx - sorry :) Maybe uninstall and reinstall using the extension manager and see if...
  3. #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 = document.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)}
    document.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

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