Hi,

I have 2 content types (A and B). Well, I use that module to create a content of type B, into the form of A.

I created a template to display the form of 2 entities A and B following that: http://drupal.org/node/269319#comment-911336

but now, when I want to create a content of type A, that module doesn't use the template that I have created.

One possible solution is that: in template of node A, specify how to put the fields of B, but I want to use the template, because is more simple. Maybe I need to "tell" to that module to load the template, how?

Thanks

Comments

gunzip’s picture

subscribing, same need.

i've got a template overwrite in my custom theme template.php
that works for the standalone node form but it gets ignored when node widget is used.

what's the right way to theme the node widget form ?

gunzip’s picture

Status: Active » Fixed

there's a simple way

function MYMODULE_node_widget_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'foobar_node_widget_form':
      $form['#theme'] = 'foobar_form';
    break;
  }
}

function theme_foobar_form($form)
{
  ...
  return $output;
}

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.