I'd like to be able to create a bunch of these and allow from the administration pages the ability for the admin to "copy" them into sessions in some way.
Hi, let me be sure I understand the terminology and request here. You would like to be able to create individual line items for an RFG and copy them into multiple session posts, correct? Using the example you shared, you would like to create an RFG line item like:
1 - Warm Up - Jog for 15 minutes at an easy pace
This is slightly different from the existing Warm Up line item, so you would like to create this new line item and you would like to be able to copy this new line item easily into multiple Session posts from some type of interface in wp-admin. Did I understand that correctly?
If so, there's nothing exactly like this built-in to Toolset because RFG line items are not intended to be shared across multiple posts. There is no editor page for each RFG line item, for example, where you can edit the item and choose individual parent posts for assignment of this line item. In the parent post screen, there's no way to import a reusable RFG line item, so you can see the infrastructure, so to say, for this doesn't exist.
Other items designed to be shared across multiple posts are other posts in a many-to-many (M2M) relationship, taxonomy terms, and reusable blocks in the block editor. There are interfaces built-in to wp-admin that help facilitate sharing those things, but nothing built-in that will help facilitate sharing RFG line items. So that's the main challenge to overcome here, and there are no public Toolset APIs for building custom interfaces in wp-admin. That's a serious problem, so admin interface development is typically not supported here in the forums.
Is there a specific reason you decided to use RFGs here instead of a separate custom post type? I can see visually how it looks like a repeatable field group is the way to go, but there are some technical reasons why I would choose the M2M approach. My gut feeling here is you will be better off using a separate post type instead of an RFG here, and use a M2M relationship to allow you to associate these line items with one or more Sessions. This process in wp-admin is quick, and requires little or no custom code. You can create the line items in the standard post editor screen and manage related Session posts from that same edit screen, or you can edit the Session post and manage connected line items (add new ones, edit existing ones, delete existing ones) right there from the Session post edit screen.
If you decide you really need to use RFGs, it might be possible to create a new RFG line item and copy it to multiple posts using a customized Form on the front-end of the site. I could help you implement something like this using our Forms and Relationships APIs. You could use Access to hide the administration Form pages from other Users and only allow admin-level access on the front-end of the site. Note that these cloned line items will not remain linked to one another in any way, so editing the line item in one place will not edit the same line item globally. If you want something like that, another post in an M2M relationship is the way to go.
In the customized Form, you would remove the built-in parent post select field. This is where you would normally choose the parent post that would contain the newly created RFG item. Instead of the built-in select field, you will create a generic checkboxes field. Each possible Session post should be listed with a corresponding checkbox in the Form, and you will use these checkboxes to select into which posts you would like to copy the new RFG. You can use a View of Sessions posts to create the checkboxes options dynamically - I can show some examples of this in other forum tickets if you'd like some guidance on this. So you will create the RFG line item as usual in the Form, but select multiple parent posts to hold the new RFG, using checkboxes.
Along with the custom Form, you'll use our Forms API cred_save_data to hook into the Form submission event. In that hook, you'll write custom code that finds the submitted checkboxes in the $_POST superglobal, and loops over the checked checkboxes. Inside that loop, you'll use the newly created RFG line item (in the first iteration of the loop), or create a cloned RFG line item programmatically (in all other iterations of the loop). You'll use the toolset_connect_posts API to create a relationship between the checked checkbox parent post and the RFG line item or cloned RFG line item.
That's the general idea. It's a bit complex and will take a considerable amount of time and custom code to set up. Maintenance won't be easy - you'll have to edit each instance of the RFG individually in all the parent posts.Another limitation is usability - depending on how many Sessions you end up having on the site, selecting parent posts in checkboxes may become tedious. In the standard parent post select field, you'll have the ability to use a typeahead / autosuggest field to type and find the parent post easily. Similarly when you choose a related post from the post edit screen in wp-admin, you'll have an autosuggest field. However, this type of input is not available as a generic field in front-end Forms so you must manually find and check each individual checkbox.
Hopefully I've given you enough detail to help you understand the pros and cons of the various approaches here. Let's discuss your thoughts and go from there. Thanks!