Tagboxes

Snippets

	<!-- Tagbox . Start -->
	<ul class="tagbox" data-name="field_name">
		<li data-value="1" data-selected="selected">Tag one</li>
		<li data-value="2" data-selected="selected">Tag two</li>
		<li data-value="3" >Tag three</li>
		<li data-value="4" >Tag four</li>
		<li data-value="5" >Tag five</li>
		<li data-value="6" >Tag six</li>
	</ul>
	<!-- Tagbox . Start -->
	
Options
Type Value
Status none, 'locked', 'disabled'
Size none, 'tiny', 'small', 'default', 'medium', 'large', 'huge'
Type Name Value
default data-name string
validation required 'required'
callback data-callback-initialize function Triggers on initialization
callback data-callback-reset function Triggers on reset
callback data-callback-change function Triggers on change
callback data-callback-validate function Triggers on validation
callback data-callback-persist function Triggers on persisting
callback data-callback-hover function Triggers on hover
callback data-callback-focus function Triggers on focus
callback data-callback-lock function Triggers on locking
callback data-callback-unlock function Triggers on unlocking
callback data-callback-disable function Triggers on disabling
callback data-callback-enable function Triggers on enabling
callback data-callback-hide function Triggers on hiding
callback data-callback-show function Triggers on showing
callback data-callback-keyup function Triggers on key up
Methods

	// Scan tagboxes
	basekit.components.tagboxes.scan(scope);
	
Parameters Value
scope null element

	// Initialize tagboxes
	basekit.components.tagboxes.initialize(scope);
	
Parameters Value
scope null container tagbox(es)

	// Update tagboxes
	basekit.components.tagboxes.update(scope,id,name,value,title,options);
	
Parameters Value
scope tagbox(es)
id id
name string
value CSV
title int
options 'locked', 'disabled'

	// Set scope
	var scope= $('.tagbox');

	// Reset tagboxes
	basekit.components.tagboxes.reset(scope);
	
Parameters Value
scope null tagbox(es)

	// Set scope
	var scope= $('.tagbox');

	// Validate tagboxes
	basekit.components.tagboxes.validate(scope);
	
Parameters Value
scope null tagbox(es)

	// Set scope
	var scope= $('.tagbox');

	// Persist tagboxes
	basekit.components.tagboxes.persist(scope);
	
Parameters Value
scope null tagbox(es)

	// Set scope
	var scope= $('.tagbox').first();

	// Persist tagboxes
	basekit.components.tagboxes.refresh(scope);
	
Parameters Value
scope null tagbox

	// Set scope
	var scope= $('.tagbox');

	// Lock tagboxes
	basekit.components.tagboxes.lock(scope);
	
Parameters Value
scope null tagbox(es)

	// Set scope
	var scope= $('.tagbox');

	// Unlock tagboxes
	basekit.components.tagboxes.unlock(scope);
	
Parameters Value
scope null tagbox(es)

	// Set scope
	var scope= $('.tagbox');

	// Disable tagboxes
	basekit.components.tagboxes.disable(scope);
	
Parameters Value
scope null tagbox(es)

	// Set scope
	var scope= $('.tagbox');

	// Enable tagboxes
	basekit.components.tagboxes.enable(scope);
	
Parameters Value
scope null tagbox(es)

	// Show suggestions
	basekit.components.tagboxes.suggestions_show(scope);
	
Parameters Value
scope tagbox

	// Hide suggestions
	basekit.components.tagboxes.suggestions_hide();
	
Parameters Value
- -

	// Filter suggestions
	basekit.components.tagboxes.suggestions_filter(scope);
	
Parameters Value
scope tagbox

	// Add tags
	basekit.components.tagboxes.tags_add(scope,suggestion);
	
Parameters Value
scope tagbox
suggestion {value: int, status: int, label: str}

	// Remove tags
	basekit.components.tagboxes.tags_remove(scope);
	
Parameters Value
scope tagbox
Default
  • Tag one
  • Tag two
  • Tag three
  • Tag four
  • Tag five
  • Tag six
  • Tag one
  • Tag two