Skip to content

Instantly share code, notes, and snippets.

@spivurno
Forked from spivurno/gist:4005779
Last active October 23, 2023 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save spivurno/4005788 to your computer and use it in GitHub Desktop.
Save spivurno/4005788 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