I am trying to use CForm builder for my form creation and i need a way to display the form data in a tabular manner. How can i apply div tags to the CForm array?
SOme of my code is below
public function getForm() {
return new CForm(array(
'showErrorSummary'=>true,
'elements'=>array(
'FirstName'=>array(
'hint'=>'6-12 characters; letters, numbers, and underscore'
),
'LastName'=>array(
'hint'=>'6-12 characters; letters, numbers, and underscore'
),
What i want is for FirstName and LastName to appear on the same row. How can i realise this with CForm builder
return new CForm(array(
'showErrorSummary'=>true,
'elements'=>array(
'<div class="div-tab"><div class="div-tab-row"><div class="div-tab-col">'.
'FirstName'=>array(
'hint'=>'6-12 characters; letters, numbers, and underscore'
).'</div><div id="div-tab-col">',
'LastName'=>array(
'hint'=>'6-12 characters; letters, numbers, and underscore; mixed case and at least 1 digit',
).'</div></div></div>',
What am i getting wrong cause the browser isn’t displaying items? Text boxes are not showing at all. I only see the word Array twice.
public function getForm() {
return new CForm(array(
'showErrorSummary'=>true,
'elements'=>array(
'<div class="div-tab"><div class="div-tab-row"><div class="div-tab-col">',
'FirstName'=>array(
'hint'=>'6-12 characters; letters, numbers, and underscore'
),
'</div><div id="div-tab-col">',
'LastName'=>array(
'hint'=>'6-12 characters; letters, numbers, and underscore; mixed case and at least 1 digit',
),
'</div></div></div>',
...