Skip Navigation

[Resolved] Pass parameter to Contact Form 7

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.95 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 6 years ago.

Assisted by: Waqar.

Author
Posts
#1128089

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

#1128224

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

#1130691

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

#1131921

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