Change / customize subject line in contact form

4 years 11 months ago - 4 years 11 months ago #312456 by shanenefdt
Hi there,
Please advise me as to the procedure to follow should I require a customized subject line in the contact form.
I have a customer that is looking to provide a standard "Inquiry from website" message in the subject line of the contact form.
Kind regards,
Shane

Please Log in to join the conversation.

4 years 11 months ago #312457 by krileon
You'll need to be more specific about what form you're referring to. CB has no control over Joomlas contact form. If you mean CBs email form accessible while viewing a users profile and clicking the link in the Email field or on the menu above their profile then it doesn't have a subject unless the user supplies one.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

4 years 11 months ago #312461 by shanenefdt
Replied by shanenefdt on topic Change / customize subject line in contact form
The contact form I'm referring to is the CB email form accessed via the email link - here's a view of what I'm referring to (please see attachment).
Attachments:

Please Log in to join the conversation.

4 years 11 months ago #312463 by krileon
There's no option to set a subject for that. The subject is user supplied. Best I can suggest is trying to override it using CB Auto Actions. The below should work.

Global
Triggers: onBeforeEmailUser
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
$variables['var6'] = 'Inquiry from website: ' . $variables['var6'];
Parameters
Reference Variables: Variable 6

That should prefix the subject the user supplied with "Inquiry from website: ". For that trigger variable 6 is a reference variable and is the subject so it can be modified. Below are the other variables available to that trigger.

$_PLUGINS->trigger( 'onBeforeEmailUser', array( &$rowFrom, &$rowTo, 1, &$emailName, &$emailAddress, &$subject, &$message ) );


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.192 seconds

Facebook Twitter LinkedIn