Tell us what you are trying to do?
Hi, I'm struggling with the implementation of a form to create a custom post that is related to a custom post I've just created. I've reviewed the documentation and struggled with it, and finally decided to reach out for support.
Is there any documentation that you are following?
Yes, I've been trying to follow along with https://toolset.com/lesson-placement/lesson-placements-1824673-1727277/#when-you-need-forms-from-connecting-between-post and https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts, but I'm not understanding how to create and implement the relationship form.
Is there a similar example that we can see?
Yes. I'm rebuilding an old app that was originally built in CMFL. You can access a clone of the app (feel free to add data) here:
access details removed.
Here's the basic schema:
An Aid Request can have many Aid Items. You can create a New Request (feel free to click the New Request link and add one). Then click Add Items, and you can then add multiple Aid Items to the Aid Request.
What is the link to your site?
My work-in-progress is at :
versteckter Link (Note, this is a development site and you can feel free to add what's needed if desired.)
u: toolsetsupport
p: wy6)oWsnpU6vBBe##75$)STY
Here's what I've got:
Custom Post Type: Aid Request
Custom Post Type: Aid Items
Relationship: (One) Aid Request to (Many) Aid Items
Form to add an Aid Item (working successfully, using a few hooks under Settings to add some additional field values on submit)
From the home page (the Admin Index), you can click New Request (versteckter Link) to create a new Aid Request post.
Here's where I'm getting stuck. The next thing I need the user to be able to do is to add Aid Items that will be related to the post just created. I assume I need a Relationship Form, but after trying to follow the documentation and studying some other support posts, I can't figure out how to put it all together.
I should note that on the old app, on adds an Aid Request (data gets inserted), then adds Aid Items in a second step. I'm okay emulating this two step process (and I created a rough Add Aid Item form which you can hit at versteckter Link), but I'd also be okay (in fact it might be more elegant) to add the Aid Items as a repeating field (since there can be many Aid Items) on the same page where the Aid Request is created (versteckter Link). Either way is fine.
It's also worth noting that most of the Aid Requests and Aid Items posts you'll see in the system were imported from the legacy system via WP All Import.
Of course Aid Requests and Aid Items will need to be edited, but I figure I should get past this hurdle first. Any help would be appreciated!
Thanks,
David