Hi,

I'm creating a module that create 'content type' and now I'm trying to create the settings page that will have links to create specific nodes. In other words, those links will call the specific function to create this nodes programmatically.

I try to create the hook_menu but I don't know which 'page callback' is better, drupal_get_form or other function to show a page, the important is this page of settings having link or buttom form for call this functions.

Comments

graysadler’s picture

I'd stick with drupal_get_form as your page_callback, unless the same url can return more than one form. Having your page_callback be a custom/local function that calls the form (using drupal_get_form anyway) seems a little redundant and inefficient and adds to the complexity of your code.

I hope that helps.

Lead Developer and Founder of StreamRiot.com