ForgeComponents
en

Components

j-TextboxList

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20

Configuration:

  • icon {String} icon for label
  • label {String} label (default innerHTML)
  • placeholder {String} adds a placeholder text into the input
  • maxlength {Number} sets a maximum length of chars
  • disabled {Boolean} disables this component
  • limit {Number} sets a maximum length of lists
  • error {String} error message when a limit is reached (default You reach the maximum limit)
  • required {Boolean} whether a list is required (default false)
  • type {String} can be email, url, currency, number, date, lower, upper, a-z or empty (default)
  • NEW movable {Boolean} enables changing of position for existing items

Use it with <ui-component name="textboxlist">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<ui-component name="textboxlist" path="redirects" config="maxlength:50;type:url;placeholder:e.g. www.totaljs.com and press enter;limit:5;error:Limit is 5 lists;icon:arrow-left">Redirects</ui-component>
<br>
<ui-component name="textboxlist" path="emails" config="maxlength:50;type:email;placeholder:e.g. name@domain.com and press enter;limit:5;error:Limit is 5 lists;icon:envelope-o;">Emails</ui-component>
<br>
<ui-component name="textboxlist" path="empty" config="maxlength:50;required:true;placeholder:e.g. Enter a value and press enter;limit:5;error:Limit is 5 lists;">Required</ui-component>
<br>
<ui-component name="textboxlist" path="empty" config="maxlength:50;required:true;type:number;placeholder:e.g. Enter any number;limit:5;error:Limit is 5 lists;">Required Numbers</ui-component>

<script>
    var redirects = ['www.totaljs.com'];
    var emails = ['name@domain.com', 'invalidemailaddress'];
    var empty = [];
</script>