This question is related to: Custom module embedding existing node form
After dealing with returning existing node form via custom module (my_singnup module achieved with the big help of Clive) returning form has no custom field groups and custom fields.
function my_signup($node = FALSE) {
if($node) {
if($node->type == 'event') {
module_load_include('inc', 'node', 'node.pages');
global $user;
$new_node = new stdClass;
$new_node->type = 'signup_node_form';
$new_node->language = LANGUAGE_NONE;
$new_node->user = $user->uid;
$new_node->name = (isset($user->name) ? $user->name : '');
$form = drupal_get_form('signup_node_form', $new_node);
return $form;
}
}
return drupal_not_found();
}
signup_node_form was build via field UI (create new content type) and looks great when core node/add/signup. It has vertical tabs, validation etc.
I was expecting to get the same with mentioned code. Unfortunately it's not working. I'm getting just Drupal stuff vertical tab (Menu, Book, Version, Adress, Comments...) without my custom groups and fields.