I have posts with a custom field (email)
I have added a CRED Contact Form to this page.
When CRED Form is submitted, I need to be able to use the Post Custom Field (email) to send the notification.
Is there any code that can achieve this without creating parent/child relationships.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Martin,
Thank you for contacting our support forum.
Will the notifications always go to the same email ?
Please let me know.
Thanks,
Shane
Hi Shane,
No, the email will be different and be set by a custom field on a post.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Martin,
Then you should be able to pass the Types shortcode for the field in the CRED field that is being used for the email.
Example
[cred-field value='[types field="my-email"]']
As you can see in this example that I'm passing the Types field as a value into the email field on the CRED form.
This only works if the CRED form is going to be on the page that is supplying the email.
Please let me know if this helps.
Thanks,
Shane
Hi Shane,
Thank you very much for your reply.
I'm really sorry but I'm struggling to fully understand.
I'm not sure what the ' is used for, this might help me understand.
Should I be using this code in the CRED Contact Form...
...In the notifications "send to a Specific Email"
...Or directly in the output loop
Hi Shane,
Sorry for this confusion, I can see now that the ' are supposed to be "quote marks"
Still confused on how to make this work.
I've tried adding your code into my CRED Contact form, which displays front end, but won't allow me to send notifications to it.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Martin,
Does the email of the page show up in the field ?
Would you mind providing me with admin access to the website so that I can have a look ?
The private fields will be enabled for your next response.
Thanks,
Shane
Hi Shane, just to add,
the contact form is on the following page:
hidden link
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Martin,
The credentials don't seem to work.
Could you check on them and let me know.
Thanks,
Shane
Shane,
Please can you open the private message for me.
Hi Shane,
Please could you open a private message for me so I can give you the login details.
Regards,
Apologies, I didnt realise I could update the previous priate message with credentials.
I've updated them for you, should work now.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Martin,
Awesome I was able to log in now and check on the form.
I've added the following and the email should now be added automatically
<i class="fa fa-envelope" aria-hidden="true"> Email Address
[cred_field field='cf-email' post='message' value='[types field="email-2"][/types]' urlparam='' placeholder='' class='form-control' output='bootstrap']
Please let me know if this helps.
Thanks,
Shane
Hi Shane,
Really sorry, but still not working. however, it does seem to work if the email value is the same as my login email, but I've tried 4 unrelated emails that dont recieve the notification?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Martin,
Not sure if you tried this but could you check the spam for those emails ?
Also if you create a post with your login email and then fill out the contact form so that it gets that email address, does the email get sent ?
Please let me know.
Thanks,
Shane