Concrete5.7.5.2 - controller set()/unset() not working
Permalink
Hello,
My form worked in C5.7.4.2. Now I've upgraded to C5.7.5.2 and my form doesn't work anymore.
I set a default field text in view.php from the controller in the view() function. If the form has errors, it doesn't submit and all entered values are still in the fields. On successful submission, all fields should be cleared. It worked in the previous version, now the field is empty on page load, but still keeps the entered values after successful submission.
For example,
view.php
and controller.php
Have any major changes been done from 5.7.4 to 5.7.5?
Thanks.
My form worked in C5.7.4.2. Now I've upgraded to C5.7.5.2 and my form doesn't work anymore.
I set a default field text in view.php from the controller in the view() function. If the form has errors, it doesn't submit and all entered values are still in the fields. On successful submission, all fields should be cleared. It worked in the previous version, now the field is empty on page load, but still keeps the entered values after successful submission.
For example,
view.php
and controller.php
... public function view() { $this->set('name', "Name"); ... if (isset($this->name)) { $this->set('name', $this->name); } else { $this->set('name', ''); } ... } ... public function action_submit_form() { if ($this->isPost() and $this->validate()) { ...
Viewing 15 lines of 24 lines. View entire code block.
Have any major changes been done from 5.7.4 to 5.7.5?
Thanks.