Custom Fields
Re-Envisioned
Support General Checkbox Checked by Default

  • Creator
    Topic
  • #13060
    Resolved Max@powdersky.com
    Participant

    Hi,

    Currently want to have a checkbox checked by default but it doesn’t seem to be working:

             array(
                'name'  => 'New Property?',
                'id'    => self::$prefix . 'new_property',
                'type'  => 'checkbox',
                'std'   => 1,
            ),

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #13075
    Anh Tran
    Keymaster

    Hi Max,

    Does it work with new posts?

    The mechanism of std in Meta Box works only if the meta box has not been saved before. Here ‘meta box’ means all fields. So if there’s any field that already has value, then std won’t work for other fields, even new fields you’ve just added.

    #13089
    Max@powdersky.com
    Participant

    Thanks Anh, that would be it!

    Shows on a new property so all fine, thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.