Skip Navigation

[Résolu] Prefill CRED form by previously visited parent CPT

This support ticket is created Il y a 7 années et 2 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

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

Dernière mise à jour par toolset-dave Il y a 7 années et 2 mois.

Assisté par: Shane.

Auteur
Publications
#574108

Hi,

I have a CPT called "company" and there is button leading to page with CRED form for creation child CPT with [cred_field field='_wpcf_belongs_company_id'...] Is it possible to have it prefilled based on previous parent CPT page?

#574165

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Dave,

Thank you for contacting our support forum.

It seems that what you want to achieve is similar to what the user in the link below wants.
https://toolset.com/forums/topic/create-flow-for-user-from-parent-cred-form-to-child-form-and-linking-them/

Take a look at the forum post and let me know if it was able to assist you.

Thanks,
Shane

#574211

Hi Shane,

thanks for the link. I took a look on it and I decided to make a change and it would be also more user friendly to have the CRED form on parent page. But now the problem is quite similar. How to automatically fill [cred_field field='_wpcf_belongs_company_id'...] with the current company on which page is CRED form displayed.

I tried this code, but it will add the new company with same name, but not select the already existing one:

[cred_field field='_wpcf_belongs_company_id' select_text='[wpv-post-title]' ]

#574246

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Dave,

Try doing this.

[cred_field field='_wpcf_belongs_company_id'  value='[wpv-post-id]' ]

Please let me know if the company is now selected.

Thanks,
Shane

#574282

Great, now I see what was wrong. Thank you, Shane.