Skip Navigation

[Resuelto] Post Form Value from URL Parameter

This support ticket is created hace 4 años, 4 meses. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 3 respuestas, has 2 mensajes.

Last updated by Sean hace 4 años, 4 meses.

Assisted by: Nigel.

Autor
Mensajes
#1412525

I have two post types: Members & Checkins
They have a 1 to Many relationships.

I have a search that returns Members. When that is clicked on, it takes you to create a Checkin based on the URL Parameter (parent_member_id). Everything works so far.
When I click that to create a Checkin (which takes me to something like: website/checking-in/?parent_member_id=10 ),

I want the title to be the exact copy of its parent Member. This is what I currently have:

[cred_field field='post_title' class='form-control' output='bootstrap' urlparam='parent_member_id']

But that only returns the numerical value of the member (10 in the above example), not the proper title.

In the past, before Toolset relationships, I did it using:

[wpv-post-title id="[wpv-search-term param="parent_member_id"]"]

but that doesn't seem to work any longer.
Ideas?

#1412987

Nigel
Supporter

Languages: Inglés (English ) Español (Español )

Timezone: Europe/London (GMT+01:00)

Hi Sean

You can set a default value using the value attribute. Populate that using the wpv-post-title shortcode and add the item attribute with the id coming from the parameter. Similar to what you describe but using the item attribute, so something like

value="[wpv-post-title item='[wpv-search-term param='parent_member_id']']"

If that doesn't work to set the field value, what happens if you just output that wpv-post-title shortcode in the form directly? What does it display?

#1413675

It just displays the title of the page where the CRED form is located.

#1413853
Screen Shot 2019-12-17 at 11.54.30 AM.png

Fixed it.
I had neglected to embed the CRED form within a View. It needed a View with a post ID filter, otherwise it wouldn't return the proper information (which is coming through the URL parameter). I had that in place on my older sites, but had forgotten that one extra step.

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