An easy way to create "adjust fields" in your forms - numeric values that can be adjusted (increased and decreased) dynamically using plus and minus buttons.
LX Adjust Field is an adjustable numeric value that uses familiar UI from games and application (plus / minus buttons). It can be assigned a pool of points and other restrictions.
How to use it:
Load the form helper class as you would normally using this line:
After that, you can add the adjust field by using the line
); The only required values are the $name and $starting_value.
If you wish to display a "Point pool" you must add a label with id points_left, and if you wish said point pool to be submitted, you may also add a hidden input with id points_left in your markup. Example:
$value_increment => This input sets the amount of points added/substracted to the field value on each click. Default value is 1.
$min => No matter how much you click the "minus" button, the value will not go below this value. Default value is -1000. Can also be a character.
$max => Same thing... Default value is 1000 and can also be a character.