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
...
echo $form->label('name', $entry_name, array ('class'=>"required"));
echo $form->text('name', $name, array ('maxlength'=>"40", 'onblur'=>"check('name');"));
...

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()) {
    ...


Have any major changes been done from 5.7.4 to 5.7.5?

Thanks.

linuxoid
 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.