timster, on 04 December 2012 - 04:56 PM, said:
I'm trying to use the new form builder implementation (added abt. 1 month ago), but running into trouble there. I have a normal CForm setup, which works the way it should, but changing CForm to TbForm produces an error:
"CActiveForm and its behaviors do not have a method or closure named "textFieldRow".
Tried to track this one down, but still a little too newbie with Yii. :-(
One tip if anyone else is experimenting with the form builder, in your view you have to use
<?php echo( $form->render() ); ?>
instead of the tutorial suggested
<?php echo( $form ); ?>
Many thanks,
Timo
Hi Timo,
here's the list of supported (and not yet supported) form elements (types) and the Tb-widgets they are rendered with; e.g. for a textFieldRow just use 'type'=>'text'.
'text' => 'textFieldRow', 'password' => 'passwordFieldRow', 'textarea' => 'textAreaRow', 'file' => 'fileFieldRow', 'radio' => 'radioButtonRow', 'checkbox' => 'checkBoxRow', 'listbox' => 'dropDownListRow', 'dropdownlist' => 'dropDownListRow', 'checkboxlist' => 'checkBoxListRow', 'radiolist' => 'radioButtonListRow', //HTML5 types not supported in YiiBooster yet: render as textField 'url' => 'textFieldRow', 'email' => 'textFieldRow', 'number' => 'textFieldRow', //'range'=>'activeRangeField', not supported yet 'date' => 'datepickerRow', //new YiiBooster types 'captcha' => 'captchaRow', 'daterange' => 'dateRangeRow', 'redactor' => 'redactorRow', 'markdowneditor' => 'markdownEditorRow', 'uneditable' => 'uneditableRow', 'radiolistinline' => 'radioButtonListInlineRow', 'checkboxlistinline' => 'checkBoxListInlineRow', 'select2' => 'select2Row'
Hope it helps.
Cheers,
Don Felipe

Help
This topic is locked















