\Kendo\UI\TextBox
A PHP wrapper for Kendo UI TextBox.
Inherits from \Kendo\UI\Widget.
Usage
To use TextBox in a PHP page instantiate a new instance, configure it via the available
configuration methods and output it by echo
-ing the result of the render method.
Using Kendo TextBox
<?php
// Create a new instance of TextBox and specify its id
$textBox = new \Kendo\UI\TextBox('TextBox');
// Configure it
$textBox->enable(true)
// Output it
echo $textBox->render();
?>
Methods
change
Fired when the value of the widget is changed by the user.The event handler function context (available through the keyword this) will be set to the widget instance. For additional information check the change event documentation.
Returns
\Kendo\UI\TextBox
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->change('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onChange(e) {
// handle the change event.
}
</script>
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->change('onChange');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
enable
If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.
Returns
\Kendo\UI\TextBox
Parameters
$value boolean
Example
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->enable(true);
?>
fillMode
Sets a value controlling how the color is applied.
Returns
\Kendo\UI\TextBox
Parameters
$value string
Example
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->fillMode('value');
?>
label
Adds a label before the input. If the input has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.
Returns
\Kendo\UI\TextBox
Parameters
$value string|\Kendo\JavaScriptFunction|\Kendo\UI\TextBoxLabel|array
Example - using string
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->label('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->label(new \Kendo\JavaScriptFunction('function() { }'));
?>
Example - using \Kendo\UI\TextBoxLabel
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$label = new \Kendo\UI\TextBoxLabel();
$content = 'value';
$label->content($content);
$textBox->label($label);
?>
Example - using array
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$content = 'value';
$textBox->label(array('content' => $content));
?>
placeholder
The hint displayed by the widget when it is empty. Not set by default.
Returns
\Kendo\UI\TextBox
Parameters
$value string
Example
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->placeholder('value');
?>
readonly
If set to true, the widget will be readonly and will not allow user input. The widget is not readonly by default and allows user input.
Returns
\Kendo\UI\TextBox
Parameters
$value boolean
Example
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->readonly(true);
?>
rounded
Sets a value controlling the border radius.
Returns
\Kendo\UI\TextBox
Parameters
$value string
Example
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->rounded('value');
?>
size
Sets the size of the component.
Returns
\Kendo\UI\TextBox
Parameters
$value string
Example
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->size('value');
?>
value
The value of the widget.
Returns
\Kendo\UI\TextBox
Parameters
$value string
Example
<?php
$textBox = new \Kendo\UI\TextBox('TextBox');
$textBox->value('value');
?>