Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esedic/5ca5b46238ae5f9cf10b01adca8e0649 to your computer and use it in GitHub Desktop.
Save esedic/5ca5b46238ae5f9cf10b01adca8e0649 to your computer and use it in GitHub Desktop.
Gravity Wiz // Limit Checkboxes Usage
<?php
// standard usage
new GFLimitCheckboxes(115, array(
5 => array(
'min' => 2,
'max' => 3
)
));
// template
new GFLimitCheckboxes(FORM_ID, array(
FIELD_ID => array(
'min' => MIN_NUMBER,
'max' => MAX_NUMBER
)
));
// multiple fields
new GFLimitCheckboxes(115, array(
5 => array(
'min' => 2,
'max' => 3
),
13 => array(
'max' => 3
)
));
// multiple forms, multiple fields
new GFLimitCheckboxes(115, array(
5 => array(
'min' => 2,
'max' => 3
),
13 => array(
'max' => 3
)
));
new GFLimitCheckboxes(38, array(
2 => array(
'min' => 5,
'max' => 5
)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment