Posted by smarsh on December 17, 2012 at 12:10am
Hi,
I'm creating a form where at the end there's a check box and it says "By selecting this box I agree to the Terms of Use and Privacy Policy". I would like to link the text "Terms of Use" and "Privacy Policy" to their respective pages, but don't see how to do it from webform.
Can anyone explain please?
Thanks!
Comments
You can create webform tpl
You can create webform tpl for doing this. Ex : webform-form-[nid].tpl.php
Thanks. I'm still a Drupal
Thanks. I'm still a Drupal nube - how does the tpl help me with linking specific text?
"I get by with a little help from my friends..."
using tpl you can put webform
using tpl you can put webform form field in html tag and created link etc. a example code is :
<?php
/**
* @file
* Customize the display of a complete webform.
*
* This file may be renamed "webform-form-[nid].tpl.php" to target a specific
* webform on your site. Or you can leave it "webform-form.tpl.php" to affect
* all webforms on your site.
*
* Available variables:
* - $form: The complete form array.
* - $nid: The node ID of the Webform.
*
* The $form array contains two main pieces:
* - $form['submitted']: The main content of the user-created form.
* - $form['details']: Internal information stored by Webform.
*/
<div class="grid_7 alpha omega" id="contact-form">
<div class="contact-form-field">
<?php print drupal_render($form['submitted']['email']); ?>
</div>
<div class="contact-form-field">
<?php print drupal_render($form['submitted']['name']); ?>
</div>
<div class="contact-form-field">
<?php print drupal_render($form['submitted']['subject']); ?>
</div>
<div class="contact-form-field">
<?php print drupal_render($form['submitted']['message']); ?>
</div>
<div class="button-send">
<?php print drupal_render( $form['actions']['submit']); ?></div>
<?php print drupal_render_children($form);?>
</div>
</div>
</div>