Skip Navigation

[Resolved] automatically importing data in another cpt into cred

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

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)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 6 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#951439

I have several CPT including Organizations and Contacts and I want to import data from some fields into a booking called Exhibits

Every time I create a new exhibit and assign the exhibit to user (author) I would like the info to be pulled into the appropriate Organization and Organization Contact fields. The exhibit data is then used in views to promote the Exhibitor and the user is able to edit the info (post cred) for that particular exhibit.

As it stands I am doing this manually by going into admin and creating a post, but it may be better to create a post form that pulls info. suggestions welcome.

Thanks,

hidden link

#951606

Hi, sorry I'm not quite clear from your description how your post types and custom fields are related, but I can show you how to use a Types field shortcode to set the value in a Form field. Here's an example:

[cred_field field='your-cred-field-slug' value='[types field="other-post-field-slug" id="12345"][/types]' urlparam='' output='bootstrap']

This part represents the custom field you want to copy:

[types field="other-post-field-slug" id="12345"][/types]

You can replace the 12345 with the correct post ID, or a shortcode that returns the correct post ID.

If this isn't what you're looking for, I need some more information. I need to know:
- All the post types involved, and their post type slugs
- All the custom fields involved, their slugs, and which posts they are associated with
- How to determine which fields from which existing posts are imported into the fields for the new post.