The signup user form is wrapped in the content of the node when signup is set to "Include on each node" in the advanced settings from signup settings page.

I want my signup form to appear beside my content. But with the actual output of the form on the node, it is not very convenient to theme.

How could render the form to appear out of the content div ?

Illustration :
Actual render

<div class="content">
Content here
<form id="signup-form">Signup form fieldset here</form>
</div>

The render I am looking for

<div class="content">
Content here
</div>
<div class="new-wrapper">
<form id="signup-form">Signup form fieldset here</form>
</div>

Comments

mikou’s picture

If I didn't get any feedback, maybe is it because I wasn't clear anouth.

What I am looking for is to print out in my node-type.tpl.php the full user signup form
Something like :

    <?php print($vars['signup']); ?>

But the signup form is not directly available in $vars...

Any idea ?

joachim’s picture

It'll be in $node->content['signup'].

richardj’s picture

But that leaves you with 2 instances of the signup form. Any way of get it out of $content? It is possible to disable the form through the advanced settings of the signup module. But that doesn't render the form in the node object. Will try to get it through the module function.

edit: obviously not cck field display ofcourse.

joachim’s picture

Category: support » feature

Hmm I do seem to remember finding this problematic, so maybe it isn't currently doable.

Let's make this a feature request then.

If you manage to dig any further, please post a patch :)

richardj’s picture

It is possible to not render it in content through the following code (in a custom module):

function CUSTOMMODULE_nodeapi(&$node, $op, $teaser = FALSE, $page = FALSE) {
  if ($op == 'view' && $page && isset($node->content['signup'])) {
    $node->content['signup']['#access'] = FALSE;
  }
}

This will prevent the form from rendering.

You then can print the form (on node level, don't know / did not tested it in a block template).

  print $node->content['signup']['#value'];