ForgeComponents
en

Components

j-Enterbox

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

A simple EnterBox. Each value needs to be confirmed via enter key or clicking on the button.


Configuration:

  • maxlength {Number} optional, a maximum length of value (default: 50)
  • icon {String} icon
  • placeholder {String} a placeholder for the input control
  • exec {String} optional, a link to a function in the window scope (otherwise data-jc-path is required)
  • button {String} adds a label to the button (default: empty)

Use it with <ui-component name="enterbox">. 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 style="padding:50px;max-width:300px">
	<ui-component name="enterbox" config="exec:enterbox_enter;icon:ti ti-search;placeholder:Search and press enter ..."></ui-component>
</div>

<script>
	function enterbox_enter(value) {
		alert(value);
	}
</script>