Hi!
I have custom post type: 'events'. Inside events I have defined a metabox group (clone: true) for 'form fields'. Form fields is used to define event registration form input fields for each event.
I have created another custom post type: 'forms'. Forms I want to use to define form field templates. Forms have also metabox group (clone: true) to define 'form fields'. Idea is that admin user can define form templates and the re-use these ready made templates on 'events'.
Problem: Currently I have defined 'type' => 'post' metabox in 'events' which gets the post_type 'forms'. But with this solution if someone edits the 'forms' post's form fields, form fields will then change in all events where that template is in use. This is not what I want.
I would want that there is e.g. a "Select template" button on admin side of 'events' post. When clicked pop-up opens and user selects the template from 'forms'. When template is selected and OK clicked from the popup, the form fields from template are copied to the 'events' metabox group 'form fields' entries.
My question: Is it possible and how do I add in JavaScript Group field clones?