drupal version: 7

Hi, I'm trying to add settings to a content type form and I'm using organic groups as a guide. I see the form elements for OG being added in the og_ui.module at line 316 in this function og_ui_form_node_type_form_alter but I don't see where these form elements are being submitted, handled, saved, processed... I would've expected it to add another submit handler to the form but it doesn't seem to be the case. Anyone have any experience with this?

  • Wrong place, main things happen on og.module. – Nikit Jun 5 '11 at 4:04
  • right, I figured the og_group_type_(node_type) variable would be set in the main module but I don't see where. How is the info from that form being processed? – Donnyboy Jun 5 '11 at 4:14

This happens automatically.

Adding a variable to that form means that it is automatically saved with variable_set() with a _node_type suffix. Similar to admin forms.

Here is another example: userpoints_nc_visits_form_node_type_form_alter().

As you can see, the form element is for example named userpoints_nc_visits_points and the default value is fetched with userpoints_nc_visits_points_type (inside the get setting api function).

| improve this answer | |

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.