The comment module (and upload module) modify the content-type configuration form to add fields, but these fields get their default value from a key including $form['identity']['type']['#default_value']:

      '#default_value' => variable_get('comment_'. $form['identity']['type']['#default_value'], COMMENT_NODE_READ_WRITE),

However, for system-defined content types, the [identity][type] is read-only (a value) field, so doesn't have #default_value

[type] => Array
    (
        [#type] => value
        [#value] => blog
    )

Would $form[orig_type] or $form[old_type] be a better place to look? (I'm still a bit unclear on the use of those values).

Comments

lyricnz’s picture

Version: x.y.z » 4.7.x-dev
Status: Active » Closed (fixed)

Obsolete, closing.