Skip Navigation

[Resolved] Forms Post – Set value from Url parameter, for 2 custom fields

This thread is resolved. Here is a description of the problem and solution.

Problem: I'm trying to use URL parameters to set field values in a Form, but I get a 404 page error.

Solution: Make sure your URL parameters are different from the slugs of your custom field type. In this case, there is a custom post type with the slug "guest", so it's better to use a different URL parameter like "guestName" instead.

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

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by kostasO 4 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1399101

Hi
I have a custom post type that hav inside two custom fields. "A" and "B"
i want to pass values to them from the url dynamically as mysite.com/mypost/?Avalue=firstvalue:Bvalue=second

i tryied to dd names to the fields of "Set value from Url parameter" but does not working

what is the correct way ?

thank you

#1399259

Hi, normally distinct URL parameters are separated with an "ampersand" character in the URL like this:

mysite.com/mypost/?Avalue=firstvalue&Bvalue=second

Is it possible to use this URL structure instead of the ":" separator you mentioned before?

#1399375

HI Cristian,
Thank you for the help.

I have alo tryied this but still does not works. Even if I only put one parameter I am getting a "Page not found if I add the ?Avalue=fisrt after the page.
I had tryied it with WPforms and it was working but now i am trying to make the same in toolset

my POst type is Guest, my custom dynamike field is name
and in the Forms at the set default value from an url parameter i added the value guest
if i put the url hidden link
I get a page not found error

and in the page you can see that even if i put "guest" as a variable to reat in the name i get {query_var key="name"}

#1399733

Since you have a custom post type "guest", I would try a different variable name like this:

mysite.com/mypost/?guestName=Antonis&guestAge=34
#1400041

My issue is resolved now. Thank you!

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