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