text

Since: Editor 1.0

Simple text field input.
Please note - this property requires the Editor extension for DataTables.

Description

This is the simplest of the field types in Editor, presenting a standard <input type="text"> element in the form.

Options

This field type supports the following options (in addition to the default options):

attr

Set HTML attributes on the input element. This is an object of attribute name / value pairs that are applied to the input element for the field. This makes it possible to set attributes such as maxlength and required.

Methods

This field type does not support any additional methods over the default methods.

Examples

Basic initialisation:

editor.add({
	label: 'Name:',
	name: 'name'
});

Setting maxlength and placeholder properties:

editor.add({
	label: 'Name:',
	name: 'name',
	attr: {
		maxlength: 50,
		placeholder: 'Full name'
	}
});