A text input field.
Parameter | Type | Value |
---|---|---|
type | required |
Predefined String (text) |
title | optional |
String |
desc | optional |
String |
placeholder | optional |
String |
std | optional |
String |
selector | optional |
String (better not to use) |
tab | optional |
String(style) |
section | optional |
String |
Always return string
'addon_text' => array(
'type' => 'text',
'title' => __('Text Field','your-textdomain'),
'placeholder' => __('Text Placeholder','your-textdomain'),
'std' => 'Default Value of Text',
)
Support 'selector' parameters but it's better not to use the selector.
Inside the rander()
method-
echo '<div>'.$data['settings']['addon_text'].'</div>';
Inside the getTemplate()
method-
<div>{{data.addon_text}}</div>