I hate to ask what I feel like must be obvious to others since I'm not seeing anyone else asking. But if there any way to use a tpl.php page for the actual form? I see you can use forward.tpl.php. That seems to be just for the email if I'm correct. So I'm looking for a way to add images and other things to the top of the actual form.

Any help or guidance would be greatly appreciated.

Comments

seanr’s picture

Component: Documentation » Code
Assigned: Unassigned » seanr
Category: support » feature
Status: Active » Needs work

This is not possible at present. I will look into adding that.

YK85’s picture

Title: tpl for form » tpl for forward form

This would be awesome!

Just like user-profile-form.tpl.php and profile-node-form.tpl.php it would be awesome to be able to fully customize the forward form page with all the different variables.

Thanks!

Bilmar’s picture

add into template.php

function mytheme_theme() {
  return array(
    'forward_form' => array(
      'arguments' => array('form' => NULL),
      'template' => 'forward-form',
    ),
  );
}

then created forward-form.tpl.php in your theme folder
if you print each variable out separately you can paste the below into the template file

<?php print drupal_render($form['message']['instructions']); ?>
<?php print drupal_render($form['message']['email']); ?>
<?php print drupal_render($form['message']['name']); ?>
<?php print drupal_render($form['message']['recipients']); ?>
<?php print drupal_render($form['message']['page']); ?>
<?php print drupal_render($form['message']['subject']); ?>
<?php print drupal_render($form['message']['body']); ?>
<?php print drupal_render($form['message']['message']); ?>
<?php print drupal_render($form['message']['path']); ?>
<?php print drupal_render($form['message']['path_cid']); ?>
<?php print drupal_render($form['message']['forward_footer']); ?>
<?php print drupal_render($form['message']['submit']); ?>
<?php print drupal_render($form); ?>

add anything else you want to the template file =)

Bilmar’s picture

Status: Needs work » Fixed

marking as fixed
please re-open if there is a different/better way to implement this

Status: Fixed » Closed (fixed)

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