PDA

View Full Version : Default Message in contact dealer form



Kemoid Wilson
October 28, 2013, 05:16 AM
Hello

Is there away for us to add default messages in the contact dealer short form? For instance when someone clicks on contact the form should already be populated with something like "I am interested in the {page title} that I saw on samplewebsite.com".

Alex
October 28, 2013, 08:59 AM
Hi Kemoid,

1. Go to your admin panel and add a new phrase
Admin Panel > Languages >> Add a Phrase
Key: co_default_message
Value: "I am interested in the [page_title]" (or another of course ;) but [page_title] is required)
System module: FrontEnd


2. Open the file: /templates/your_template/tpl/controllers/listing_details.tpl
Find an textarea with id="contact_owner_message"

And modify it like below:


<textarea id="contact_owner_message" rows="6" cols="" style="width: 97%;">{$lang.co_default_message|cat:"\n"|replace:"[page_title]":$pageInfo.name}</textarea>

Kemoid Wilson
October 28, 2013, 11:57 AM
Thanks Alex it is working the only problem is that users who don't login wont see this message.

Alex
October 29, 2013, 04:26 AM
You are welcome!


users who don't login wont see this message.

That is easy ;)



<textarea id="contact_owner_message" rows="6" cols="" style="width: 97%;">{if $isLogin}{$lang.co_default_message|cat:"\n"|replace:"[page_title]":$pageInfo.name}{/if}</textarea>

Kemoid Wilson
November 6, 2013, 01:31 AM
Thanks it helped a lot