Skip Navigation

[Resolved] Prefill CRED form by previously visited parent CPT

This support ticket is created 7 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 4 replies, has 2 voices.

Last updated by toolset-dave 7 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#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

Languages: English (English )

Timezone: 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

Languages: English (English )

Timezone: 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.