By pembeci on
I created a new module which defines a new content type. It works fine, I can choose "Create content" and create a new node of this new type. However on node add/update form "Input Format" field group is missing. Other default node creation form elements (i.e. Menu settings, Comment settings) show up. I checked the hooks (hook_node_info was a suspect) to see if I have to specify this but couldn't find such a hook. I checked admin pages for "Input Formats" and "Content Types" to see if I have to relate a content type to possible input formats but couldn't find such a settings page.
Thanks in advance.
Comments
Found the answer
I missed these drupal goodies:
filter_form
node_body_field
The second one generates body field with teaser and filter. For an example see:
node_example_form
Trying to do this
I'm trying to do this with filter_form as described here http://drupal.org/node/459850.
I already have a body field, and want to add the input format form to another textarea. I am under the impression node_body_field() is only supposed to be used for actual "body" fields, and I can't figure out how to associate filter_form() with my textarea form element.
Would you be able to provide some hints as to how you managed to do this?
Thanks!