NO BUG: Bricks form submission sends to admin email address rather than dynamic custom email address

Browser: Any
OS: macOS

I have a set of team member cards that are generated via a query loop onto a Metabox custom post type. In the custom post type there is a field to hold the team member’s email address. Each team member is a separate post.

In the team member card design there is a Send message button which when clicked opens a pop-up template which holds the form. In the form there is a basic text field at the top that dynamically prints the name of the selected team member - this works fine.

I can also add the dynamic data email field into the form’s message field and when the form appears the email address for that member is shown correctly. So the form is getting the email address.

The action on the form is to email and to a custom email address in the format {mb_team-members_member_email}. This is where the problem occurs, Bricks is sending the email to the admin email address, not the team member’s.

I am also using a dynamic data field for the team member’s name in the success message and this is not being printed either.

I known smtp is working as I am using fluent forms as well and these send correctly. It is only with Bricks forms that are in query loops that are having the issue.

Thanks.

Hey Simon,

thanks for your report.

This is a current limitation when using forms within a query loop. We will see if and how we could improve this potentially. Feel free to create an idea.

At the same time – in my opinion – it does not sound like the right approach to output the same form on a page multiple times.

However, to make the dynamic email routing work for now you could use the following method:

1. Create a hidden field with the dynamic email tag as the value

2. Use this hidden field in the email settings

The same approach should work for the name in the success message.

Let me know if that helps.

Best,

André

Hi André,
Thanks for the reply. As the site is due to go live soon, I replaced the pop-up form for each team member with a form on the page containing a dropdown list of which team member the visitor wants to contact.
Once the site is live, I’ll test your solution on a staging site and let you know. I agree that perhaps having a pop-up form template in a query loop card is perhaps not the best way to go but it made the page look neater. There are 11 team members on the page and so at the bottom of the html under the footer, there were 11 pop-up definitions. The DOM is now a lot better with just the one form!
Cheers, Simon

Hey Simon,

Once the site is live, I’ll test your solution on a staging site and let you know.

That’d be great!

With your current (one form) setup you could also have a button for each member in your query loop which opens the popup and then use some custom JS to pre-select the correct member in the form popup – if you’re familiar with JS. :slight_smile:

Best,

André

Alas I’m not familiar enough with JS! The single form isn’t in a pop-up, it’s just on the page. The button in each member’s card just jumps down the page to the form.

Hmm, I’ve just seen this bug raised: Not able to use dynamic tags in form submit. Emails ignore dynamic tags. Looks like a similar issue to mine.

I am having the same issue. Unfortunately, putting the email address in a hidden field is not a solution as it makes it available to bots gathering email addresses for spamming. For me, the whole purpose of using a form with a “Send to custom email address” field using an address taken from a dynamic value is to avoid the email address being seen.

I have tried it with a loop and it doesn’t work. I have also tried it with a value returned from a function and that doesn’t work either. Although both values are returned correctly if I test them in a text field.

This looks like a bug to me as the “Send to custom email address” has an icon indicating that a dynamic value should be possible.

Is that something that can be resolved? If not, does anyone know of a good form plug-in that would work in that way?

Hoping for a solution.