Skip Navigation

[Resolved] Pull Custom ID created with toolset and include it in form

This support ticket is created 3 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 3 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#2330873
Screenshot 2022-03-31 101142.png

Tell us what you are trying to do?
I'm trying to create a form that pulls the data from a custom field created with Toolset and send attach it to the form when the user sends an inquiry.

On the page I shared below there is a button that says contact us which I want to use for this purpose. Currently this button sends the user to the contact us page but I want to create a dynamic form that pulls the Custom field data when the user clicks on this button.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
not at the moment.

What is the link to your site?
hidden link

On this link you can see one of the property images.

I've attached an image showing the button and the field I want to include in the form.

#2330975

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for getting in touch.

The best thing to do here is to send this listing ID over the URL and retrieve it on your contact form.

You can do this by manually constructing your contact form link like below.


<a href="linktocontactform/?id=[types field='my-field'][/types]">Contact Us</a>

The [types field='my-field'][/types] will provide the value of the listing ID in the URL. However you must change my-field to the slug of your actual field.

Secondly when you're on the form page, you can retrieve the value from the URL. I'm not sure which forms plugin you're using but you can use this shortcode below to get the value of the field in the url.

[wpv-search-term param='id']

Thanks,
Shane