Skip Navigation

[Resolved] CPT father and soon and CRED 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by andreaV-4 1 year, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2550065

Hi,
I should handle this situation.
I have two custom post types: "dates" and "reservations".
In the custom post type "reservation" I should put the callback to "dates" so that in reservations I can select the relevant date and enter the values.

I should then also give the user via a CRED form the ability to porte manage the entry and modification of this data. For the dates, however, I should also enter a search for them.

Example:
the user arrives at a cred form in which there is an option to search and choose a date (dedicated custom post type). Once the date is chosen he fills in all the reservation data and confirms it.

The custom post type oltra to the date also has other fields, a kind of calendar with date, place and other data.

I hope I have made myself clear. Is it possible to do this with Toolset?

Regards

#2550701

Hello,

It should be possible with Toolset one-to-many relationship + child post form.

For example:
1) Setup two post types:
- Dates
- Reservations(with custom date fields)

2) Setup one-to-many relationship between Dates and Reservations
https://toolset.com/course-lesson/how-to-set-up-post-relationships-in-wordpress/

3) In single Date post, you can display:
a) post view with custom search form:
- Query related Reservations posts
https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items
https://toolset.com/course-lesson/creating-a-custom-search/
b) A child post form link for creating new Reservations post:
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/

#2551839

Hi Luo Yang,
thanks for the information.

This sounds like what I need. This (date lookup and more) I didn't understand if it works then in a user-side editable CRED form?

Regards

#2553379

Please elaborate the new question with more details:
I didn't understand if it works then in a user-side editable CRED form?

What kind of user-side editable CRED form do you want?
Toolset post form can work in WordPress frontend, your user can fill and submit the form in WordPress frontend

#2553385

Hi Luo Yang,
once I merge the custom post type dates and reservations I should give the ability to a frontend user via a CRED form to:
- edit the custom post type reservations
- be able to search the CRED form for the date from the custom post type date and match it to the reservation.

The way it works is this: the user, in a frontend page via a cred form should be able to select an available date and fill in the reservation data.

I hope I have been clear

Regards

#2554059

In my opinion, you can try these:
1) Setup three post types:
- Dates (with custom date fields)
- Reservations

2) One to one relationship between "Dates" and "Reservations"

3) Create a page, for example "Search Dates", in this page, display a post view with custom search form:
- Query "Dates" posts,
- Filter by the custom date field
- In view's loop, display "Dates" post information + child post form for creating new "Reservations" post,
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/

So user can search "Dates" post, and create Reservations post, and select related "Dates" post.

#2554079

My issue is resolved now. Thank you!