Skip Navigation

[Resolved] Customisable contact form

This support ticket is created 4 years, 7 months 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Beda 4 years, 7 months ago.

Author
Posts
#1356191

Tell us what you are trying to do?
I would like to add a contact form to a page and make the recipient customizable.

I already create a custom type with the required field I've also created the form. What I want is the ability (for all editor) to put this form to any page that he want and that he can specify the recipient (sending to).

Is there any documentation that you are following?
https://toolset.com/forums/topic/specific-contact-form/

Regards

#1356215

This is not easily possible with Toolset Forms, for such contact forms a contact form plugin would suit better, as they are designed for this.

However you can achieve it with Toolset as well.

You would need a few more steps though.

You need a way to tell the form, to send the email to a specific one each time depending on how the form is inserted.

One way to do so, is to populate the Email Field in the Toolset Form, to which the notification will be sent, by either a default value IN the Form, but that won't allow many users changing it, or using the URL argument to pre-populate the field.
We are going to use that, because this way each user can insert a link to the form passing another URL parameter (their email), and hence each time the notification will be sent to another mail.

To set this up, you need the Post Type and an email field for it.
Then, a Toolset Form that edits those posts, and includes the (hidden, if you want) Email Field.
Switch to the Expert mode in the Form, and make sure to insert that Email field with the URL parameter of your choice, using the GUI.
It results in something like [cred_field field='mymail' force_type='field' class='form-control' output='bootstrap' urlparam='myurlparam']
Remove other things from the form you do not want the users to edit, and leave only the field of the notification itself (post body most likely) and submit button plus the hidden email field.

Add a notification to the form, sending to the mail specified in that form field, and insert the post body or whatever used for message in the notification

Then, you can insert this form anywhere on a page, and when visiting that page with a link to the page, passing the URL parameter ?myurlparam=email-of-editor@mail.com, the form will load each time with the mail added to the myurlparam.

That will then, when the form is sent, send the email to the specific receiver passed in the URL.
So the task of the Editors would not be to insert the form (well, they can, if they want), but the most important would be, they link from somewhere to that form, passing their email in the URL parameter

Please let me know if something is unclear, in the process.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.