Tell us what you are trying to do?
I have two post types, (request-line and accessories), which both have the same parent post type (item-model).
request-line has the field 'quantity' as well as the parent item-model.
accessory has the fields 'amount' & 'accessory-item' as well as the parent item-model.
The field 'accessory-item' is actually storing item-model id's as well as the parent item-model id. The reason for this is that I'm trying to store a list of items that are accessories for the parent item. eg. If you rent a certain item, I want to suggest a list of other items that people normally rent with the original item, for the user to accept or edit.
When a request-line form is submitted, I would like to query accessories to see if there are any that have the same parent model-item as the request-line just submitted.
If there are matches I would like to open a view on a new page which shows a list of CRED forms, one for each accessory that has the same parent, HOWEVER, the forms should be saving to request-line, not accessory.
So If there are three accessories that have the same parent model-item as the current request-line, I wish to show a view with three request-line CRED forms, with the 'amount' and 'accessory-item' fields from the three corresponding accessories filled in as default values for the 'quantity' and 'model-item' parent fields for the request line forms.
So then the user can edit or submit those 3 forms, and then go back to the page where they were filling in the request-lines.
Does this make sense? How could I go about doing this?