What is a CheckBox Group?
Imagine to have same checkbox in a form and each one can be a category, and you need the user choose minimum one or more category. With this behavior you define a group of checkbox and validate toghether to be sure the user check what you need.
To create a group of checkbox you must insert in your form some standard checkbox and add to them the special attribute dwzGroup like:
<input name="chk_1" dwzGroup="CheckGroup" type="checkbox" id="chk_1" value="1" />
<input name="chk_2" dwzGroup="CheckGroup" type="checkbox" id="chk_2" value="2" />
<input name="chk_3" dwzGroup="CheckGroup" type="checkbox" id="chk_3" value="3" />
the value of the dwzGroup special attribute is the Name of the Group and in the behavior fields panel you will find a single line for all this checkbox with the value of the dwzGroup attribute in the Field name column.
Condition:
You can define a validation condition.
The condition can be a valid Javascript code or a custon function but must return true or false.
The extension verify the result of this condition and in case of true continues to test the subsequent validations and in case of false stop and set tha validation of the field as valid.
For example if you must validate a field only if it is visible you can define a function that check the field visibility and return true if visible and false if not visible, so you can condition the validation and validate the field only if it is visible.
Required:
The user must check minimun of checkbox of the group
Multiple:
You can define a mininum and a maximun checkbox the user must check
Custom Function:
With this feature you can create your own Javascript validation function and pass the name to our extension. The extension will eval your function and return the value your function return. The name of your function can contain only letter and number. The extension will call your function and pass the name of the text fied.
This is an example:
<script language=javascript>
function yourOwnFunction(name){
//Here your validation code
//name is the name of the field you must validate
//the name is passed from out extension
//Here your validation code
}
</script>
This function must return a true or a false
This is what you must write in the fied in the extension panel:
Error message:
The message display if the field is not validated