How To Access Form Element In Controller

How can I access the elements of my view in controller. lets I have a field name ‘type’ in my form field and I want to access the value of that field in my controller class. How can I achieve that. I saw where we are fetching all attributes


How can I get a specific attribute from $model->attributes Thanks in advance

I want to pass a value from form to the model.

Getting One value from the form


echo $alerts['property'];

// setting one value to model




Further reading



you can access it directly by





attribute type must be defined in model class or it must be part of table related to model class