Admin EMails - Tokens are not replaced in 'Alternative Reply-To Email' and ..

  • OPape
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

OPape created the topic: Admin EMails - Tokens are not replaced in 'Alternative Reply-To Email' and ..

Hi,

I build a contact form and try to use the entered email address and name for the fields
'Alternative Reply-To Email' and 'Alternative From Name' to make it easier to reply direct to the incoming contact message.

Example:

Alternative Reply-To Email = {contact_email:value}
Alternative From Name = {contact_name:value}

In both fields the tokens not replaced but it works perfect in field 'Custom Email Subject'. Here all tokens replaced as expected.

Is this a bug, a feature, or am I doing something wrong?

Otherwise, BreezingForms is a great product and I have been able to experience all the tasks with it so far.

Thanks and regards,
#231097
  • Posts: 5958
  • Karma: 119
  • Thank you received: 554

MarioPuco replied the topic: Admin EMails - Tokens are not replaced in 'Alternative Reply-To Email' and ..

Hey,

If you want to pass values from your form to your let's say "Custom Email Subject" you simply need add the name of the element you want to pass value from and wrap it in curly brackets like so : {email}.

Hope this clarifies the situation.

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#231101
  • OPape
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

OPape replied the topic: Admin EMails - Tokens are not replaced in 'Alternative Reply-To Email' and ..

Hi Mario,

yes in the "Custom Email Subject" it works:
Custom Email Subject = "New message from: {firstname} {lastname} <{email}>"
... produces a subject like this:
"New message from: Peter Miller <p.miller@domain.com>"

But if this tokens used in "Alternative Reply-To Email" and "Alternative From Name" you got emails with a sender address like this:
{firstname} {lastname} <mailer-daemon@mydomain.com>

In these fields replacement does not work.

Regards,
Olaf
#231104
  • Posts: 5958
  • Karma: 119
  • Thank you received: 554

MarioPuco replied the topic: Admin EMails - Tokens are not replaced in 'Alternative Reply-To Email' and ..

Olaf,

Alternative Reply-To Email and Alternative From Name can accept only 1 parameter, for example you cannot put {email}{lastname} but ONLY {email} OR {lastname}.
But there is a workaround for this too...

What you have to do is create a hidden field in your form where it's value should be :
ff_getElementByName('hidden_element').value = ff_getElementByName('name').value + " " + ff_getElementByName('lastname').value;

Latter on you can add {hidden_element} to your Alternative From Name.

Hope this helps.

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#231114
  • OPape
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

OPape replied the topic: Admin EMails - Tokens are not replaced in 'Alternative Reply-To Email' and ..

Thanks Mario,

but I'm really new with BreezingForms.

1. I put your code modiefied with my fieldanmes
ff_getElementByName('contact_hidden_name').value = ff_getElementByName('contact_firstname').value + " " + ff_getElementByName('contact_lastname').value;
in the Value field of contact_hidden_name.
notOK - contact_hidden_field contains exact this string.

2. I put your code modiefied with my fieldanmes and <?php
<?php ff_getElementByName('contact_hidden_name').value = ff_getElementByName('contact_firstname').value + " " + ff_getElementByName('contact_lastname').value; ?>
in the Value field of contact_hidden_name.
notOK - I got an Parse error ... in line1.

3. I tried it in "Submit pieces"->Before Submit->Type "Custom" with
ff_getElementByName('contact_hidden_name').value = ff_getElementByName('contact_firstname').value + " " + ff_getElementByName('contact_lastname').value;
notOK - contact_hidden_name is always empty

What I'm doing wrong?

Thanks and regards,
Olaf
#231133
  • Posts: 5958
  • Karma: 119
  • Thank you received: 554

MarioPuco replied the topic: Admin EMails - Tokens are not replaced in 'Alternative Reply-To Email' and ..

Olaf,

No worries, I can see that you are familiar with coding, but tiny tweaks are required since you are combining PHP with some JS and it won't work :D

You will need to add this code to Form Advanced Options > More options > Scripts > Initialization Script > Custom > Press "Create Code Framework" and add this inside the function :
setInterval('ff_getElementByName("contact_hidden_name").value =  ff_getElementByName("contact_firstname").value + " " +  ff_getElementByName("contact_lastname").value;',500);

Let me know if this worked for you.

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#231194
Moderators: ForumSupporttomeperica
Time to create page: 0.072 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