cakephp-1.3 > FormHelper :: input()
FormHelper
- __dateTimeSelected
- __generateOptions
- __secure
- __selectOptions
- _extractOption
- _initInputField
- _inputLabel
- _isRequiredField
- _name
- &_introspectModel
- button
- checkbox
- create
- dateTime
- day
- end
- error
- file
- hidden
- hour
- input
- inputs
- isFieldError
- label
- meridian
- minute
- month
- password
- radio
- secure
- select
- submit
- text
- textarea
- year
A
AclBase
AclBehavior
AclComponent
AclNode
AclShell
Aco
AcoAction
AjaxHelper
ApcEngine
ApiShell
App
AppController
AppController
AppHelper
AppHelper
AppModel
AppModel
Aro
AuthComponent
B
BakeShell
BakeTask
BehaviorCollection
C
Cache
CacheEngine
CacheHelper
CakeErrorController
CakeLog
CakeRoute
CakeSchema
CakeSession
CakeSocket
ClassRegistry
Component
Configure
ConnectionManager
ConsoleShell
ContainableBehavior
Controller
ControllerTask
CookieComponent
D
DataSource
DbAcl
DbAclSchema
DbConfigTask
DboMssql
DboMysql
DboMysqlBase
DboMysqli
DboOracle
DboPostgres
DboSource
DboSqlite
Debugger
Dispatcher
E
EmailComponent
ErrorHandler
ErrorHandler
ExtractTask
F
File
FileEngine
FileLog
FixtureTask
Folder
FormHelper
H
Helper
HtmlHelper
HttpSocket
I
I18n
I18nModel
i18nSchema
I18nShell
Inflector
IniAcl
J
JavascriptHelper
JqueryEngineHelper
JsBaseEngineHelper
JsHelper
L
L10n
M
MagicDb
MagicFileResource
MediaView
MemcacheEngine
Model
ModelBehavior
ModelTask
MootoolsEngineHelper
Multibyte
N
NumberHelper
O
Object
Overloadable
Overloadable
Overloadable2
Overloadable2
P
PagesController
PagesController
PaginatorHelper
Permission
PluginShortRoute
PluginTask
ProjectTask
PrototypeEngineHelper
R
RequestHandlerComponent
Router
RssHelper
S
Sanitize
Scaffold
ScaffoldView
SchemaShell
Security
SecurityComponent
SessionComponent
SessionHelper
SessionsSchema
Set
Shell
ShellDispatcher
String
T
TemplateTask
TestSuiteShell
TestTask
TextHelper
ThemeView
TimeHelper
TranslateBehavior
TreeBehavior
V
Validation
View
ViewTask
X
XcacheEngine
Xml
XmlElement
XmlHelper
XmlManager
XmlNode
XmlTextNode
input
line:716 at
/cake/libs/view/helpers/form.php
Generates a form input element complete with label and wrapper div
Method
(string)
input
($fieldName, $options = array())
Parameters
Parameter | Type | Comment | Default |
---|---|---|---|
$fieldName | string | required This should be "Modelname.fieldname" | |
$options | array | optional Each type of input takes different options. | array() |
Return
stringComment
Generates a form input element complete with label and wrapper div
### Options
See each field type method for more information. Any options that are part of
$attributes or $options for the different **type** methods can be included in `$options` for input().i
Additionally, any unknown keys that are not in the list below, or part of the selected type's options
will be treated as a regular html attribute for the generated input.
- `type` - Force the type of widget you want. e.g. `type => 'select'`
- `label` - Either a string label, or an array of options for the label. See FormHelper::label()
- `div` - Either `false` to disable the div, or an array of options for the div.
See HtmlHelper::div() for more options.
- `options` - for widgets that take options e.g. radio, select
- `error` - control the error message that is produced
- `empty` - String or boolean to enable empty select box options.
- `before` - Content to place before the label + input.
- `after` - Content to place after the label + input.
- `between` - Content to place between the label + input.
- `format` - format template for element order. Any element that is not in the array, will not be in the output.
- Default input format order: array('before', 'label', 'between', 'input', 'after', 'error')
- Default checkbox format order: array('before', 'input', 'between', 'label', 'after', 'error')
- Hidden input will not be formatted
- Radio buttons cannot have the order of input and label elements controlled with these settings.
@param string $fieldName This should be "Modelname.fieldname"
@param array $options Each type of input takes different options.
@return string Completed form widget.
@access public
@link http://book.cakephp.org/view/1390/Automagic-Form-Elements
### Options
See each field type method for more information. Any options that are part of
$attributes or $options for the different **type** methods can be included in `$options` for input().i
Additionally, any unknown keys that are not in the list below, or part of the selected type's options
will be treated as a regular html attribute for the generated input.
- `type` - Force the type of widget you want. e.g. `type => 'select'`
- `label` - Either a string label, or an array of options for the label. See FormHelper::label()
- `div` - Either `false` to disable the div, or an array of options for the div.
See HtmlHelper::div() for more options.
- `options` - for widgets that take options e.g. radio, select
- `error` - control the error message that is produced
- `empty` - String or boolean to enable empty select box options.
- `before` - Content to place before the label + input.
- `after` - Content to place after the label + input.
- `between` - Content to place between the label + input.
- `format` - format template for element order. Any element that is not in the array, will not be in the output.
- Default input format order: array('before', 'label', 'between', 'input', 'after', 'error')
- Default checkbox format order: array('before', 'input', 'between', 'label', 'after', 'error')
- Hidden input will not be formatted
- Radio buttons cannot have the order of input and label elements controlled with these settings.
@param string $fieldName This should be "Modelname.fieldname"
@param array $options Each type of input takes different options.
@return string Completed form widget.
@access public
@link http://book.cakephp.org/view/1390/Automagic-Form-Elements