So I am fiddling with the Yii Framework and in one of the views, specifically the create form, I am trying to give one of my textfields a default value. Therefore when I go onto
I believe the MVC way to do this is to place your default value either in your Model:
class MyModel extends \yii\db\ActiveRecord
{
public $teamlead = 'my default value';
....
}
Or in your controller:
class MyModelController extends Controller
{
public function actionCreate()
{
$model = new MyModel ();
$model->teamlead = 'my default value';
...
}
}