You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name | Checkbox
Reporter | Elana D.
Submit Date | 9/14/2022
Summary | Limit checkmarks on a specific number specified in the editor
Put settings in editor that will set this variable from there or not at all. Below code does this for you if you change the name of your checkmark and put in functions.php. This would need to be added to other selection boxes as well.
`
function weforms_limit_checkbox() {
?>
<script type="text/javascript">
(function($) {
var max_limit = 3; // Max Limit
var last; //last checked
$(".wpuf_invoice_price_6:input:checkbox").each(function (index){
this.checked = (".wpuf_invoice_price_6:input:checkbox" < max_limit);
}).change(function (){
if ($(".wpuf_invoice_price_6:input:checkbox:checked").length > max_limit){
$(last).prop('checked', false);
}
last = this;
});
})(jQuery);
</script>
The text was updated successfully, but these errors were encountered:
Limit how many checkmarks can be selected
Name | Checkbox
Reporter | Elana D.
Submit Date | 9/14/2022
Summary | Limit checkmarks on a specific number specified in the editor
Put settings in editor that will set this variable from there or not at all. Below code does this for you if you change the name of your checkmark and put in functions.php. This would need to be added to other selection boxes as well.
`
function weforms_limit_checkbox() {
?>
<script type="text/javascript">
(function($) {
The text was updated successfully, but these errors were encountered: