Editing Text on Webform's Confirmation Page

form on clipboard

I love being able to use Webform to quickly whip up a form for a client, like for a web-to-lead page or a contacts database. One customization that clients almost always request is to modify the text on Webform's confirmation page. Unfortunately the way to do this isn't immediately apparent... in fact it's kind of hidden!

According to this post on Drupal.org, all Webform response text should be configurable. There is a special template you can use to configure this text.

The template file is actually inside the Webform module's home directory, and it's called webform-confirmation.tpl.php. Here's the default code:


/**
* @file
* Customize confirmation screen after successful submission.
*
* This file may be renamed "webform-confirmation-[nid].tpl.php" to target a
* specific webform e-mail on your site. Or you can leave it
* "webform-confirmation.tpl.php" to affect all webform confirmations on your
* site.
*
* Available variables:
* - $node: The node object for this webform.
* - $confirmation_message: The confirmation message input by the webform author.
* - $sid: The unique submission ID of this submission.
*/
??>

5 Comments

Webform

Dave,

The confirmation page is easy. What about modifying the confirmation email that gets sent to the website owner. I'm working on a site that askes a potential customer some questions about their needs.

The confirmation email to the busisness owner is cryptic. I'd like to theme is better.

Any good advice?

Thanks,

mike

Merci beaucoup, je voulais

Merci beaucoup, je voulais simplement demandé de mettre en place un blog sur mon site des entreprises, machine а sous, pour lesquelles nous utilisons Drupal, et je me souviens de ce type de configuration est une vraie douleur, mais vous avez réussi à l'enlever assez facilement. Merci.

Use Webform Rules module.

Use Webform Rules module. Then you have access to the $nodes & $user & $data.
So you can write a php code that sends emails via mail function to the use or based on some field entry in the webform

Did you enjoy this post? Please spread the word.