Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Intro Black Friday Offer for a lifetime*

Change / customize subject line in contact form

5 years 6 months ago - 5 years 6 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
Last edit: 5 years 6 months ago by shanenefdt.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48554
  • Thanks: 8292
  • Karma: 1445
5 years 6 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 or Create an account to join the conversation.

5 years 6 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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48554
  • Thanks: 8292
  • Karma: 1445
5 years 6 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:
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.

Code:
$_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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum