Creating Form With Form Builder Generates A Hidden Field

I’m a newbie with Yii and I am practicing with the form builder.

The thing is that that when I create a form with form builder it creates a hidden field the purpose of which I don’t understand. I’ve googled this issue with no success and I’ve came across some posts in this forum that mention something regarding hidden fields being generated upon submitting the form. But this is not my case.

This field is generated upon form creation and it looks like this:




<div style="visibility:hidden">

   <input type="hidden" value="1" name="yform_8071a227" id="yform_8071a227">

</div>



What is this field for? Is there a way to disable this behavior?

Thanks

This is the unique identificator of the form added while rendering it and (no surprise) it is used to identify the form in the current page.

You can change the value to ‘yform_XXXXX’ by setting the ‘id’ attribute to ‘XXXXX’. Why do you want to disable this?

Thanks for the quick reply!

I really have no reason to disable it (specially now that I know its purpose) … I just wanted to know if there was a way to do so just I case I ever had a good reason and to understand better the inner workings of the form builder.

thanks again :)

Glad I could help :)