Is there an easy way to change the HTML 'title' of a page with the contacts form in it, depending on the form state?
eg for normal title ='Conact us'
on error title='Contact Form Error'
on sent title='Contact email sent'
Change HTML 'title' of a page with the contacts form depending on form state?
Re: Change HTML 'title' of a page with the contacts form depending on form state
It's a little bit tricky, but it works
1. Open function.contact_form.php with your favourite editor
2. Add after line 24
3. Add after line 88
4. Add after line 91
5. Create a copy of your current template and go to edit mode
6. Add directly after
7. Change
to
8. Attach this template to your contact form page
9. Have fun
...
1. Open function.contact_form.php with your favourite editor
2. Add after line 24
Code: Select all
$ctitle = array("Contact Form Error", "Contact email sent");
Code: Select all
$smarty->assign_by_ref('contacttitle', $ctitle[0]);
Code: Select all
$smarty->assign_by_ref('contacttitle', $ctitle[1]);
6. Add directly after
Code: Select all
{content assign='contactcheck'}
Code: Select all
<title>{title}</title>
Code: Select all
<title>{if $contacttitle != ''}{$contacttitle}{else}{title}{/if}</title>
9. Have fun

Re: Change HTML 'title' of a page with the contacts form depending on form state
Thank you very much cyberman, that seems to work just fine. i had been playing with something like this but could not get it quite right, so your help is much appreciated!
I really must get into Smarty a bit more
It makes for a much more accessible form don't you think?
Russ
I really must get into Smarty a bit more

It makes for a much more accessible form don't you think?
Russ