Reputation: 2198
I have a CForm which is instantiate in a controller. Now I need to use some widgets as its element, even by validations and more capabilities. Who to do that?
Upvotes: 1
Views: 349
Reputation: 6606
Validations are something that belong into the realm of the injected model. It is not the duty of CForm
to perform any input validation/sanitization.
As for widgets, see this part of the guide. Just before the section "Specifying Static Text," there is a whole bunch of informations on how to integrate widgets extending either CInputWidget
or CJuiInputWIdget
.
Upvotes: 2