Skip to content

feature request : need support the formBuilder functionality of yii #12

yiqing-95 opened this Issue Oct 4, 2012 · 7 comments

3 participants


the original yii formbuilder functionality use the CActiveForm . if we want change it to another one just specify the activeForm property of CForm . i v tried the original yii-bootstrap extension but it will display a ugly form to me , and i do post a feature request to chris83 . seems that he don't have too much time to do this . so i post the feature request here again , hope this feature will be accomplished !

      thanks for your great working  , this one is really nice as the yii-bootstrap is 

One of the features was in fact to create automatic form displays for simple Models in TbGridView (the typical "add button") and one of the thoughts were to use CForm configuration for that. So I'll try to add it asap...

Would be nice if you could also propose something on the *-wip branch... Thanks for your words

@tonydspaniard tonydspaniard was assigned Oct 6, 2012

Formbuilder support is important for me too.

First I tried the direct way using the widgets, but detected the problem of the 'type' attribute of a 'TbInput' in a config array:

'elements' => array(
                    'type'=>'textfield', //<------------ problem double 'type' keys

Another solution can be a custom CForm and override render(), renderBody(), renderLabel() ...


I think yii-joblo has a point here... maybe is better to create a TbForm to handle those issues and implement the different types of elements that YiiBooster has should be the solution


A 'TbForm extends CForm' is the only solution, the 'type'=>'...inputwidget ...' will never work.

I have detected another problem to:
A 'TbInput' needs a 'form' instance of the type 'TbActiveForm' on init().
So I have to additionally assign a ready created 'form'=>... in the elements-array.

But when using the formbuilder I want a 'CForm' and a CActiveForm and CForm is not compatible ...: if($form->submitted() ..., $form->validate() ...)


I have implemented the support for the formbuilder (new components TbForm, TbFormInputElement).
I will upload it to my fork in a few days.


Uploaded and added a pull request.


done by yii-joblo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.