Hi , in the _form.php data i have this:
<?= $form->field($model, ‘email’)->textInput([‘maxlength’ => 45]) ?>
This is from Person model , so i want that value from input to get in my controller, i try this :
But it return empty array.
Any help please.
Could you please post your view and controller? that way it’s gonna be easy to help you.
ps: Don’t forget to use the code snippet.
you can’t display things from controller. it is the View role.
The better way to test whether a form has been submitted is a condition in the controllet i think. But your controller and View code will tell more!
It will work at any case.
I am not clear about why $_POST is not working, But it may be due to your config.
Are you sure your form button does a submit?
Try to check what is sent to the server at browser level, like using firebug extension.