This is a request based on an accessibility review of our site, which uses numerous webforms. When the user submits a form, it would be ideal if they knew right away whether or not they were successful in submitting the form. Yes, they could navigate to the main content area and read the confirmation message, but the recommended and most efficient way to provide confirmation is to include this in the title of the confirmation page, something like "Successfully submitted - [FormTitle] | SiteName].

I'd appreciate it if this feature were considered for a future release.

Comments

quicksketch’s picture

You can do this by theming your webform-confirmation.tpl.php. Just put drupal_set_title(); in that file with the title you'd like to have for your confirmation page.

michellezeedru’s picture

Status: Active » Closed (fixed)

Ah, yes, that worked perfectly. Thanks!

omerida’s picture

I was also trying to override the title, and while putting it in your .tpl.php file works, I'm not sure it really belongs there. Template files should just echo variables, with as few side effects as possible.

I tried using drupal_set_title() in my preprocess function for webform_confirmation (mytheme_preprocess_webform_confirmation) but that didn't work. I tracked down a later call to drupal_set_title, in webform.module at the start of the function webform_client_form which was overriding my own call. I don't think that drupal_set_title should be there, it'd be better if it was called during template_preprocess_webform_confirmation()

omerida’s picture

oops - this is closed, should I open a new issue?