1

I'm working on a module and was wondering how to get a node type setting (that was set when creating the node type at: admin/structure/types/manage/YOUR-TYPE) inside a node creating/editing page.

I added a node structure setting with the hook: mymodule_form_node_type_form_alter() and now I want to check if this option is active when creating/editing a node, hook: mymodule_form_node_form_alter()

  • I can't really understand what you're asking. Can you include the code you used to add the setting? – beth Aug 27 '14 at 20:20
  • Moved the comment to answer, so this doesnt have to stay unanswered. – user20301 Aug 28 '14 at 10:01
1

Node type forms save their data in variable table prefixed with form field name and suffix will be node type.

If field was $form['MY_SETTING']=array(...); you can get the value with variable_get('MY_SETTING_' . $node->type, '');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.