Fetch data from a Mode (Database Table) and crate a tag.
App::Html()->modelTag(Name,Model, [Default Value],[Parameter],[Option]);
Parameter |
Description |
---|---|
Name |
Name of the Input element |
Model |
Database Model name |
Default Value |
Default Value of the tag |
Parameter |
Define Input Type, SQL Condition, Key Value and Element title of of element. val: Field name used as a label of input file. By Default set to id |
Options |
Html attributes |
See bellow example:
echo App::Html()
->modelTag(
"date[Member][id]",
"Member",
"",
array(
"condition" => "email like '%f%'", // By default fetch all
"inputType"=>"radioTag", // By default set selectTag
"key" =>"id", // By default set id
"val"=>"email"
),
array("class"=>"app_input")
);