InputArray

Features

  • Add items onKeyDown enter

  • Delete items onKeyDown backspace

  • Animated shake notifies the user if they try to break required min/max array items

  • The value returned by the field is an array [...]

Methods

->type(string $type)

  • Use any HTML5 input type except search and range.

->placeholder(string $type)

  • Applied to each input.

->showEmptyItem($count = 1)

  • Define how many empty items you want to show as default.

  • Please note that this option has nothing to do with validation! If you show empty fields and set the field to be required, it might be confusing to the user when they get an error when they submit the form.

->deferEntangle(bool $state = true)

  • Not recommended to set this option to false because it will sync the field value, on every keystroke.

->minItems(int $min = 1)

  • Require minimum items, prevents the user from deleting input items.

->maxItems(int $max = 0)

  • Allow max items, prevents the user from adding input items.

  • 0 equals no limitation

Last updated