Skip to content
h1mesuke edited this page Sep 14, 2010 · 8 revisions
bp.text = function(label, id, _default /* , [attrs,] [tooltip,] [validateFunc] */) {

Creates a text field for a string value.

Example

text("Text 1", 'text_1', "String"),

Validation

If validateFunc specified, the function will be called before saving the settings to validate the value input by the user. The value to validate is passed to the function as its first argument. If the function returns false, the saving is canceled.

The default validate function always returns true.

Attributes

label

type: string [optional]
The position of the label of the field. Available values are 'left', 'hide'.
The default value is 'left'.

If set to 'hide'. The label is hidden.

Clone this wiki locally