Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Handling of default values in lib/Form.php

edited October 2015 in Framework

lib/Form.php is changing the value for a field mistakenly, I believe.


default = 'no'

lib/Form.php lines 283-293 (with added info lines):

    info ($this);
    // Determine the default values
    foreach ($this->rules as $field => $rules) {
        foreach ($rules as $key => $value) {
            if ($key === 'default') {
                $o->{$field} = $value;
    info ($this);

If I load the edit view of a record that has show_email set to yes, I get [show_email] => yes from the first info ($this) and [show_email] => no from the second.

Sign In or Register to comment.