Hi,
I want to pass the content of a custom field to Contact Form 7 when they click on a button. How can I achieve this?
Best regards,
Nick
Hi Nick,
Thank you for contacting us and I'll be happy to assist.
With Types Fields API, you can get values from custom fields through shortcode or through PHP code:
https://toolset.com/documentation/customizing-sites-using-php/functions/
To enable third-party shortcodes in the Contact Form 7 plugin, I'll recommend consulting plugin's official support and documentation, for most accurate and up-to-date information.
Following are some useful links on the topic:
https://wordpress.org/plugins/contact-form-7-shortcode-enabler/ (third-party plugin)
https://wordpress.stackexchange.com/questions/45266/how-to-use-other-shortcodes-inside-contact-form-7-forms
https://wordpress.org/support/topic/shortcode-in-email-body/
I hope this helps! Please let me know if you need any further assistance.
regards,
Waqar
Hi,
Thanks for your response. Unfortunately this is way to complicated.
Can it be done with CRED? I really need this simple setup: people open a toolset view and I only need to fill the subject field of a form to be filled with the content of the custom field. Further people need to be able to upload a file from their pc and send the contact form by mail simply clicking on submit.
I would like to hear if this is possible in one or another way.
Best regards,
Nick
Hi Nick,
Thanks for writing back.
Yes, it is possible to create a contact form using the Toolset Forms (CRED) plugin and these will be the steps:
1. You'll first create a new custom post type (e.g. "contact requests") using the Toolset Types plugin.
https://toolset.com/documentation/user-guides/create-a-custom-post-type/
This post type will be used to store contact form submissions from the visitors.
2. Next, you'll add the relevant custom fields to this post type, for each form field that you'd like the visitors to fill in.
https://toolset.com/documentation/user-guides/using-custom-fields/
3. Lastly, you'll create a CRED form and configure its field and E-mail notification settings, as explained in the following guide:
https://toolset.com/documentation/user-guides/creating-cred-forms/
regards,
Waqar