spivurno
11/3/2012 - 3:58 AM

Gravity Wiz // Limit Checkboxes Usage

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
        )
    ));