-
Notifications
You must be signed in to change notification settings - Fork 1
text
Everett Griffiths edited this page May 20, 2014
·
1 revision
Syntax: text(string $name, string $default='',array $args=array(),string $tpl=null)
-
$name
string the name of the field (required) -
$default
string the default value for the field. This will get overridden by setValues(). (optional) -
$args
array any additional arguments to pass to the field. (optional) -
$tpl
string formatting string.
<?php print \Formbuilder\Form::text('first_name'); ?>
Set a default value:
<?php print \Formbuilder\Form::text('first_name', 'Bob'); ?>
Set other parameters via the $args array:
<?php
print \Formbuilder\Form::text('first_name', 'Bob',
array('label'=>'First Name','description'=>'Your given name','class'=>'important')
);
?>
© 2014 and beyond by Craftsman Coding