Send form to Address specified from a select list of who to contact

  • Posts: 2561
  • Karma: 87
  • Thank you received: 344

mihaela replied the topic: Send form to Address specified from a select list of who to contact

Hello again,

I have to note that forum posts don't get published until they are reviewed and approved. That is the reason why they don't appear right away.

As for the email query, this is the only way to do so since sending email based on a select list's value is meant to work for one email at the time. Therefore, there isn't a simpler way.

Regards,

Mihaela
#236728
The following user(s) said Thank You: Cpointcc
  • Cpointcc
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 127
  • Thank you received: 0

Cpointcc replied the topic: Send form to Address specified from a select list of who to contact

Good afternoon,

OK, I've gotten some feedback from the client. The sending part is working fine from the select list.

The real problem is the email when sent is using the default from, and reply to email.

If the email is sent to person 2 from the drop down, how when they reply can it look like it came from that person. I'm sure it will need a special script, but I have no idea how that will work.
#237091
  • Posts: 2561
  • Karma: 87
  • Thank you received: 344

mihaela replied the topic: Send form to Address specified from a select list of who to contact

Hello,

Do you mean that in the email which is being sent an email address of the person submitting the form should be set as reply-to address?

If that is the case, it can be easily resolved.

Lets say that you have a Textfield in your form named "emailfield" where person filling in the form enters his email.

Then this code is needed to fetch the email:
$email =ff_getSubmit('emailfield');

To set this address as recipient you would replace this line of code:
$this->sendMail($from, $fromname, "email1@mydomain.com", $subject, $body);
with this one:
$this->sendMail($email, $fromname, "email1@mydomain.com", $subject, $body);

Let me know whether this is what you wanted to achieve.

Regards,

Mihaela
#237093
  • Cpointcc
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 127
  • Thank you received: 0

Cpointcc replied the topic: Send form to Address specified from a select list of who to contact

It sounds good. Where do these changes get made for testing?
#237107
  • Cpointcc
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 127
  • Thank you received: 0

Cpointcc replied the topic: Send form to Address specified from a select list of who to contact

On second though maybe that is not right.

The email form gets sent to a person from the select list. That select list upon receiving the email if they try to reply, we want that person from the select list to show as the responder, not the generic reply from.

Example:


So whom ever the email was directed to, when they reply it should show those emails from and to.
#237108
Attachments:
  • Posts: 2561
  • Karma: 87
  • Thank you received: 344

mihaela replied the topic: Send form to Address specified from a select list of who to contact

Hello again,

It seems that I've misunderstood your question.

First of all, did you, in the end, use the solution for sending email from crosstec.org/en/support/online-documenta...ifferent-emails.html or you have written the code in End Submit for sending emails?

Is what you want to send an email to a person who is filling in the form to their address that they fill in the form.

If that is the case, just go to the Advanced properties of that "E-Mail address" field in your form and check the "Mailback" checkbox.

That way, an email will be sent to the person filling in the form.
To set the address from "Who is your question for" as reply-to address, just go to form's Advanced properties > More options > Mailback emails and in the "Alternative Reply-To Email" put the name of the "Who is your question for" field in curly brackets, like this {fieldname}.

Here you can take a look at the documentation regarding reply-to address. crosstec.org/en/support/online-documenta...-reply-to-field.html and crosstec.org/en/support/online-documenta...r-email-address.html .

Let me know whether this is what you wanted and whether you have managed to set this for your form.

Regards,

Mihaela
#237117
Moderators: ForumSupporttomeperica
Time to create page: 0.197 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here