ForgeComponents
en

Components

j-Checkboxlist

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20
  • for custom design you can use j-CheckboxListExpert
  • now supports darkmode

Configuration:

  • required {Boolean} (optional) enables "required" (default: false)
  • items {String} (optional) static items key1|value1, key2 with value, key3|value
  • icon {String} (optional) icon for label without fa- e.g. home, cog, etc.
  • checkicon {String} (optional) check icon without fa-, (default: check).
  • label {String} (optional) label (default is HTML content)
  • type {String} (optional) can be number (converts String values to Number)
  • datasource {String} path to data-source (must be array)
  • text {String} determines a property name for text (in data-source), default: name
  • value {String} determines a property name for value (in data-source) default :id
  • empty {String} (optional) empty text for empty data-source
  • disabled {Boolean} (optional) disables this component

Use it with <ui-component name="checkboxlist">. 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
<div class="container">
	<div class="row">
		<div class="col-md-8 col-md-offset-2">
			<ui-component name="checkboxlist" path="selected" config="datasource:datasource;class:.col-sm-2;type:number">Frameworks</ui-component>
		</div>
	</div>
	<br />
	<div class="row">
		<div class="col-md-8 col-md-offset-2">
			<ui-component name="checkboxlist" path="selected" config="icon:home;required:true;items:Total.js|1,jComponent|2,Express.js|3,React|4,Angular.js|5;class:.col-sm-2;type:number">Frameworks</ui-component>
		</div>
	</div>
</div>

<script>
	var selected = [1, 2];
	var datasource = [{ id: 1, name: 'Total.js' }, { id: 2, name: 'jComponent' }, { id: 3, name: 'Express.js' }, { id: 4, name: 'React' }, { id: 5, name: 'Angular.js' }];
</script>