Sauter la navigation

[Résolu] I cant create field type that show custom field from parent post

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
I cant create field type that show custom field from parent post

Solution:
You can use [wpv-search-trem] shortcode to catch the URL param from URL to display the parent field value based on parent ID passed to URL param.

For example:

[types field='upn_number' output='raw' item="[wpv-search-term param='parent_upn_id']"][/types] 

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/i-cant-create-field-type-that-show-custom-field-from-parent-post/#post-1179069

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-search-term

This support ticket is created Il y a 6 années. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Ce sujet contient 6 réponses, a 2 voix.

Dernière mise à jour par rafaelL-2 Il y a 6 années.

Assisté par: Minesh.

Auteur
Publications
#1179014

I am trying to:
I'm creating a child form that I need to show the name and date of the parent field, but all the variants I've used none is working

Link to a page where the issue can be seen:
the site is on maintenance

I expected to see:
the field its Upn-number
the relation its upn-diagnostico
and tried that

[types field='upn_number' format='FIELD_NAME: FIELD_VALUE' item='@upn-diagnostico.parent'][/types]
[types field='upn_number' format='FIELD_NAME: FIELD_VALUE' item='$parent'][/types]
[types field="upn_number" style="text" id="[cred-post-parent get='id']"][/types]

Instead, I got:

Nothing its emply

#1179018

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - could you please tell me where exactly you added the form or child post or any page? Is it the child form?

#1179019

If need access to site i can give access to server to check it.

#1179026

The chilld form are on a page that is called with that button
[cred_child_link_form form='166' text='Diagnostico' target='_self']
that button its on a menu inside of Layout of parent post . and call the child form.
The link between parent and chirld its correct because i see the number in select box to link with parent with that code

<label>Muestras UPNs</label>
cred_field field='@upn-diagnostico.parent' value='[wpv-post-id]' select_text='--- not set ---' class='form-control' output='bootstrap']

That field show the number of parent its correct but i cant access to other field values

#1179031

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Could you please share problem URL where I can see the form and what parent field you would like to display?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#1179069

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Ok - to display the parent field upn_number - you should try to use the following shortcode:

[types field='upn_number' output='raw' item="[wpv-search-term param='parent_upn_id']"][/types] 
#1179081

My issue is resolved now. Thank you!