Skip Navigation

[Resolved] CRED – Editing child data in parent form

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by beatR 7 years, 11 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#153128

Hello
we have this relation: Contractor Type as parent, Contrator prices Type as Child (Time Unit, Price, Currency, Description). I have set the relationship in the types. If i edit in wordpress admin an contractor, i can add "Contractor prices" types below in the same form.
I need the same functionality in CRED/Frontend form: the contractor needs to see his own profile and be able to edit/add/delete his prices.

what i have seen so far is making a form for the Child and then set the parent (in our case contractors) in there. is there a way to display the contractors profile and his prices on one form?

if i do a form for contractor, no code for prices is added.

thank you very much!

#153236

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hi beatR,

Are you going to edit child posts in the CRED form of parent post ?
It is not possible within CRED,
I suggest you try this:
1) Create a CRED form" for edit parent post type "Contractor", for example "edit Contractor"
2) Create a CRED form" for edit Child post type "Contrator prices", for example "edit Contrator prices"
3) create a View list all Child post of current parent post:
Querying and Displaying Child Posts
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/
Add the "edit Contrator prices" form as a field of the view

#153255

Thanks, i think that will serve!