[SOLVED] Email form

2 years 4 months ago - 2 years 3 months ago #327627 by galanopd
[SOLVED] Email form was created by galanopd
If Public Email Form is set to yes the Send Email appears.
How can I "edit" the fields that appear on the form? Actually I need to add more fields for the recipient to see.

Please Log in to join the conversation.

2 years 4 months ago #327633 by krileon
Replied by krileon on topic Email form
Only way to add new fields and process those fields is CB Auto Actions or a custom plugin. onAfterEmailUserForm can be used to add new fields to the form the same way CB AntiSpam does with captcha. onBeforeEmailUser can then be used to process those fields and add that information to the email. Both triggers variables are as follows.

onAfterEmailUserForm
$_PLUGINS->trigger( 'onAfterEmailUserForm', array( &$rowFrom, &$rowTo, &$warning, 1, &$allowPublic, &$name, &$email, &$subject, &$message ) );

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

Most variables are references so for example you can modify the message of the email and add the fields to it. There is no functionality to add BCC/CC/Attachments from this trigger though if that's what you're needing.


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.

2 years 3 months ago #327647 by galanopd
Replied by galanopd on topic Email form
Below is an image of what I am trying to achieve.
Thank you

Attachments:

Please Log in to join the conversation.

2 years 3 months ago #327657 by krileon
Replied by krileon on topic Email form
What are those email options supposed to do? It's easy enough to render whatever HTML you want there using onAfterEmailUserForm, but adding some sort of functionality/storage to that HTML is more complicated.


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.

2 years 3 months ago #327661 by galanopd
Replied by galanopd on topic Email form
Actually I need to inform recipient that the sender has chosen one of the options. It is mainly informative

Please Log in to join the conversation.

2 years 3 months ago #327666 by krileon
Replied by krileon on topic Email form
Ok, then you should be able to do that with the above 2 triggers in CB Auto Actions. Both auto actions would be Code actions. For onAfterEmailUserForm you'd just be using an HTML code action and output your checkboxes by setting Mode to Return under the Output tab. For onBeforeEmailUser you need to set Variable 7 as a Reference Variable under Parameters then use a PHP code action to modify that variable using $variables to add your checkbox value to the message being emailed.


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.227 seconds

Facebook Twitter LinkedIn