Tuesday, 15 March 2011

php - What is use and Benefit of Yii FormElement Template -


I have something in the Yii framework. What is the benefit of giving yii2 in this way ['template' = & gt; & Lt; Div class = "form-group" & gt; {Input} & lt; Label class = "control-label" & gt; {Label} & lt; / Label & gt; & Lt; / Div & gt; ']

For example:

  & lt ;? = $ Form-> Field ($ Model, 'Remember', ['Template' = & gt; '

I want to write a code for it.

The default template is:

  '{label} \ n {input} \ n {signal} \ n {error}'  

$ template-detail

If you want to customize the status of the label, input or error, then edit it Not required.

You can remove the instance label.


No comments:

Post a Comment