Is there a hook to alter webform confirmation message? In Drupal 7 using webforms, is there a hook that can alter the outgoing confirmation message shown to someone who has just submitted a form?



My thoughts are to put a text placeholder inside this textarea and do a str_replace to update the output based the submission itself.
Like the @zhilevan told you can use hook_form_alter for placeholder and for str_replace you can implement hook_template_preprocess.

Here is an example.

function my_module_preprocess_webform_confirmation(&amp;$vars) {

    $confirmation = check_markup($vars['node']-&gt;webform['confirmation'], $vars['node']-&gt;webform['confirmation_format'], '', TRUE);
    module_load_include('inc', 'webform', 'includes/webform.submissions');
    $submission = webform_get_submission($vars['node']-&gt;nid, $vars['sid']);
    $confirmation = _webform_filter_values($confirmation, $vars['node'], $submission, NULL, FALSE, TRUE);

   // Strip out empty tags added by WYSIWYG editors if needed.
   $vars['confirmation_message'] = strlen(trim(strip_tags($confirmation))) ? $confirmation : '';

}


Source Webform Token support on confirmation message.

you can also take a look on tpl file option.
Here webform-confirmation.tpl.php