Buy Now
Sign in

CF7 Dynamic Recipient for email

netamity , April 26 2021, 17:46
N
netamity 15
April 26 2021, 17:46 #396304
 Answer
I have a validated copy of CF7 and I've built a rather impressive booking system with it, but stumbled on a final task that should be easy.
I have a PHP action on the start page that pulls in data from a table, and setting it into the $this->data array. I then have a hidden field that is populated. One of those fields is user_email. The field appears in the source, when viewing the form and has the correct value. All good.
When I go to set up an email action on the end_page action, I see when I click on the Recipients box a few options such as form.start_page - client ref and a few others, but not the hidden field i want. In fact, the options presented are only a fraction of the fields in the form. I tried manually typing in the field, but it appears without the blue formatting that denotes a dynamic field.
1)Why aren't all my fields showing as options in the dynamic list?
2)If I can't make this happen, how can I add this dynamic value now that explicit and dynamic data is combined in version 7?
I tried the 'Save changes and reload the editor' option hoping that would refresh things, but no luck. Something isn't working with the dynamic data dropdownwn options.
Help!
Andy
N
netamity 15
May 05 2021, 09:27 #396363
Figued it out- you can't use hidden fields as dynamic email addresses. Had to change it to a text input.
GreyHead 65
May 05 2021, 11:00 #396366
Hi Andy,
It sounds as if the hidden field may be disabled and, if so, the data is not submitted. Setting it as invisible should work OK.
Bob
If you'd like to buy me a coffee or two, thank you very much