TOPIC:

Calling the mail sending script 1 week 5 days ago #254308

  • baramoonda's Avatar Topic Author
  • baramoonda
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 21
  • Thanks: 1
Hi! :)
We have a dropdown list:
value 1
value 2
...
value 5
Can we send mail depending on the value?
For example: if the value is 1, nothing happens, but if the value is 5, does the client receive an email?

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

Calling the mail sending script 1 week 5 days ago #254309

  • baramoonda's Avatar Topic Author
  • baramoonda
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 21
  • Thanks: 1

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

Calling the mail sending script 1 week 5 days ago #254310

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3785
  • Karma: 3
  • Thanks: 303
Hi,

1) In Properties of your form uncheck the Mail notification checkbox. Also, in the Advanced options of element where user enters his email uncheck the Mailback checkbox if it was checked. It is necessary to turn off these email notifications in order for this to work.

2) Go to Advanced options of your form ->More options -> Submit pieces -> End Submit, set Type to Custom and in the code area below paste the following code:
$this->execPieceByName('ff_InitLib');
$from = ff_getSubmit('email');
$fromname = ff_getSubmit('name');
$recipient = 'your@email.com'; /* Change to Your Admin Email Address */
$sel=ff_getSubmit('nameofselectlist'); //change nameofselectlist with name of select list 
(not title)
$body = '';
foreach ($this->maildata as $data) {
  $body .= $data[_FF_DATA_TITLE].": ".$data[_FF_DATA_VALUE].nl() . "\r\n"; 
}
$this->sendMail($from, $fromname, 'adminemail@test.com', $subject, $body);  // replace adminemail@test.com with your admin email
//that line of code sends submitted data to the admin email

$this->sendMail($from, $fromname, $recipient, $subject, $body); //this line of code sends submitted data to the email address that user has entered in email field of your form

//Define content of the  emails
$body1 = 'This is the first email, here you can add your text;
if($sel == "value1") {
$this->sendMail($from, $fromname, $recipient, $subject, $body1);  }


Hope this helps

P.S: here is example how to send email based on radio button (for select list is the same)
crosstec.org/en/forums/3-breezingforms-f....html?start=6#243266

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

Calling the mail sending script 1 week 3 days ago #254404

  • baramoonda's Avatar Topic Author
  • baramoonda
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 21
  • Thanks: 1
Thanks, I'll be testing this weekend!

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.069 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!