Gravity Perks – Gravity Forms Limit Checkboxes
A simple method for restricting the number of checkboxes that can be inspected (and the number of checkboxes * that need to * be checked) on a checkbox area.
Exactly how do I install this snippet
Copy and paste the code into your theme’s functions.php file.
Do I need to customize this fragment to deal with my kind
This snippet currently makes use of a class format. This implies you can much more conveniently utilize it on numerous kinds! To instantiate this class, you will need to know the kind ID, area ID and minimum/maximum variety of checkboxes that should be allowed/enforced for that area. It will look something similar to this:
https://gist.github.com/4005788
In template form:
https://gist.github.com/4005788
You can specify multiple checkbox fields on a details kind thus:
https://gist.github.com/4005788
Finally, you can apply this capability to numerous types:
https://gist.github.com/4005788
And that’s it!
Reviews
There are no reviews yet.