I have a custom post type called organizations. I would like to you use toolset forms to link organizations to the woocommerce product custom post type, making use of the post type relationship.
A user should use a frontend form to search for organizations and then select one to link it up with a product.
Or even have a toolset form that creates a product. This form should also contain a toolset view where you can search for organizations and then select one organization which will then be related to the product you just created with the form.
I see what you are trying to do now. You're essentially creating a parent/child relationship from a search ? What I mean is that you want the user to create their posts with some parent information already filled in.
There is a simpler way to do this.
Do you have any Parent/Child relationship setup in Types ? Also Will this be a one to many ? Meaning that the child can only have 1 parent post ?
It should be noted if you are using our Toolset forms to create a woocommerce product on the frontend then you will only have the Basic information to populate such as Post title, Description and featured image.
Are you aware on how to create a post relationship with Types ? If so please let me know so we can move to the next step.
However, what I need is: A submission form for products that contains a toolset view where I search for organizations and then select one organization which I can then connect to the product I create with the form.
I hope that makes sense.
Can you show me how I can do that?
To have the organization search functionality inside the product submission form is important to me.
The method that you want would not be possible since a view operates independent of a form.
My advise is that you create a the view and the user can search for their organisation.
On that view there will be a button that says, create product.
Once the user clicks that then they will be taken to a page with the Organisation parent field already filled in and all they need to do is fill in the other items.
Please let me know what you think of this and we can move from there.
What our view will be displaying is only the results. If you are going to use views to provide data for a Toolset Form field then it cannot have any pagination or slider settings.
It can only be purely the results of the view.
Which is why I suggested that you create a view that would list the parents. Then you can add a child form link to link from that parent in the view to create the child post for that clicked parent.