Yiibooster
Make it gorgeous. Do it Fast.

Hi! Many thanks for the great work with this one (obviously also to Chris)!

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'.

As far as I understood by looking at the source, it maps the CForm compatible types to Booster field generators, which makes perfect sense for compatibility between TbForm and CForm. But whether its set to text or TextFieldRow, both fail. Here is the relevant part of the trace:

That is a good idea, you mean to include the checking of the validation rules and apply those to the model if the were on the JS widget setup or viceversa?

PS: I would like to personally thank you for your support and help 'Don Felipe'

Yes. Just in case someone does not add these options but they have already been defined in the model's attribute and validation rules. Then, an easy check via getValidators(attributeName) will do the trick. If someone adds these options to the widget setup it would make sense to set the validation rule for this scenario.

I will replace the old jQuery file upload with the TbFileUpload widget on my side soon. Let me know if you want me to do this and send another pull request... if you can wait until Wed perhaps? I owe you one for the extended filter.

Yes. Just in case someone does not add these options but they have already been defined in the model's attribute and validation rules. Then, an easy check via getValidators(attributeName) will do the trick. If someone adds these options to the widget setup it would make sense to set the validation rule for this scenario.

I will replace the old jQuery file upload with the TbFileUpload widget on my side soon. Let me know if you want me to do this and send another pull request... if you can wait until Wed perhaps? I owe you one for the extended filter.

As far as I know, CJuiDatepicker (or other "widgets") cannot be placed with a proper label in front of them (unless I missed something. Highly probable).

I recently proposed a wrapper that fitted my requirement (rendering a CJuiDatePicker as a regular field) but was rejected, so I'm looking for a way to do that without the hassle of extending TbActiveForm, TbInput and the like.

Question is: How to I render a CJuiDatePicker (or whatever widget for that case) like I render other fields (Example: echo $form->fileFieldRow($model, 'fileName')

As far as I know, CJuiDatepicker (or other "widgets") cannot be placed with a proper label in front of them (unless I missed something. Highly probable).

I recently proposed a wrapper that fitted my requirement (rendering a CJuiDatePicker as a regular field) but was rejected, so I'm looking for a way to do that without the hassle of extending TbActiveForm, TbInput and the like.

Question is: How to I render a CJuiDatePicker (or whatever widget for that case) like I render other fields (Example: echo $form->fileFieldRow($model, 'fileName')

Thanks in advance!

Why it cannot be used as we regularly do? We have the Bootstrap jquery css to display those widgets. Isn't it good enough?

I have something discussed with kazuo that is to create a TbHtml Helper component that will extend from CHtml and will take care of the most common input tags + HTML5 type. Maybe that could be a good place for it?