This support ticket is created 3 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Tell us what you are trying to do?
The easiest example to explain what I am trying to do is - the discover-wp tutors sample site which is great display of the kadence blocks integration with toolset but seems to be lacking a way to book or even send a context aware form to the the tutor.
I am trying to build something very similar but the sticking point is there seems to be no way to add a custom field which is a form, although there is a custom field which is a post reference.
Is there a similar example that we can see?
functionally it would work like this https://wordpress.org/plugins/acf-gravityforms-add-on/ (but using toolset forms of course)
In many cases we cannot use toolset blocks to build the post template but I can always use custom fields as the dynamic data for Oxygen builder for example.
Mostly I am curious if I missed something.... it feels like it should be easy to do but I can't find anything, and all the examples I found on discover-wp lead us down a logical path to either book or request or register.., but then nothing ! .... it feels like either something is missing or I am missing something obvious !
Both Tutors and C&B properties.... I am continuing to look.
cheers
btw I looked at created a form to populate the post....
Hi, you are correct in that there is no "form" type custom field in Types, but you can insert a Toolset Form in a WYSIWYG or multiline text custom field using a shortcode, then implement that custom field elsewhere on the site in a dynamic way. Insert a Form by title like so:
If you explain a bit more about what you mean by a context-aware form, I might be able to provide some additional guidance. For example, you can use generic hidden fields in Forms to capture the post ID of the post where the Form is displayed. That's one way Forms can provide access to the context in which the Form was submitted. That contextual information could then be available in an email notification for this Form, or in a Forms API callback for this Form submission, etc. I'd need more information about what exactly you want to accomplish to be able to give you better advice here.
Another way would be to implement a post relationship between the post type created by the Form and the post type of the post or page where the Form is displayed. For example, say the Form is displayed in the template for post type "A" and is configured to create posts in post type "B". If you have a one-to-many (O2M) post relationship set up between CPT A (parent) and CPT B (child), then you can configure the Form to create child posts by automatically linking the new post being created and the post where the Form is displayed, in this O2M relationship. You can enable this automation by either using the "Create child post link" feature, or by applying specific settings in the child post Form. The "Create child post link" is simpler to implement, but the workflow requires you to display the child post Form on a page that is separate from the parent post. This feature is described in the doc here: https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/
In an alternate child post creation workflow, the child post Form is displayed directly in the parent post template. This setup requires a bit of code in the Form's relationship field configurations. Set the default value of this field using a post ID shortcode, pointing at the current page as the source of the post ID. This shortcode will produce the ID of the post where the Form is being displayed, so adding it as the default value of the post relationship field will result in the current page being selected as parent automatically.
I think you answered the content aware bit, by which I merely meant that the form is aware of the post in which is is displaying and therefore can use some of those fields in a notification.
The form notification can get that dynamic data from the post, to send in the confirmation - rather than having a seperate form per post.
I am more used to gravity forms for this sort of this so It might take me a couple of days to get my head around the differences and make an update
In the meantime I just wanted to say thank you for taking the time to explain. If we can leave this ticket open for a few days I will post here the result .
Of course, I'm glad to help educate on the features here. I have set the ticket status pending your update, and I will stand by for your update. You will be prompted with email notifications before the thread closes automatically.
as a single line custom field default value, then added the single field using blocks and an additional kadence tab.
It works well where the Post author = the person being 'booked'.
tb-calendar just an example I use, I imagine any booking plugin which can accept the author ID as a parameter to map the bookable person could use this method.