We have user accounts with a Freelancer role. We have posts with a Freelancer custom post type for each Freelancer user. We would like to set up a relationship between the two so they stay connected for a future application we're going to try to develop.
Right now these user accounts and Freelancer posts already exist on the site. But we plan to set up a Toolset Form which will then generate future Freelancer posts from the form submission. We will also want to have the relationship established between the user that submits that form and the Freelancer post that gets created from the form submission.
In addition to that, we offer a free test platform http://www.discover-wp.com where you can create a free test site using the reference site which is build on top using Toolset that will help you to learn more about Toolset.
=> https://discover-wp.com/site-templates/
Hmm, that's interesting. From what I gather on the page you steered me to here, we can have something of a "relationship" established through the authorship of the Freelancer page that would be created as a result of the Toolset Form submission. Is that correct? It's not a formal Relationship using that Toolset functionality, but it could still be used to accomplish the same thing through conditional filtering on the post author name. Do I understand this correctly? If so, that *could* work for what we plan to do.
We're not going to have child post types like paintings, songs or websites associated with these users as the examples given on the page you linked, so that should make things easier here.
What we do plan to have is a page that gets created from the initial form submission that will have *another* form on it. The first form submission is going to be an Application for Membership. That Application will provide all the data/files for fields that we need to build our Freelancer pages. So with a Toolset Form submission, we'll be able to automatically generate these Freelancer pages from the application submissions going forward that way. I'm confident that we'll be able to get this done from what I've already learned about Toolset Forms. That's the first post that the form submission would create.
But then we will hopefully be able to use the same form submission to create a second post of another content type. I'm not sure if that will be possible or not. Let me know if that can be done. If it is possible, this second post will be one where the relevant applicant information will be displayed in different format and then under that information we'll have another form. Upon submission of the first form, we plan on notifications to be sent to all Board Members of the organization. So any time there is a new application, board members will be alerted. We hope to be able to include a link to the second post that is created from the initial form response in this notification. That form on the second post will be a form for Board Members to vote and provide commentary about the applicant. All votes will then be analyzed manually by the site admin and if the applicant is voted positively to become a member by the Board, the site admin will then manually publish the first Freelancer page that was created through the original submission. So the votes from the Board will need to be collected in and displayed by a view filtered by the username (Author) of the original form submission. That's where we needed the relationship between the user and the custom post type that I'm asking about. But if we can do this through the post author data, that should work, right?
Does all of this make sense? Does this seem like we'll be able to accomplish this? I planned to try to build this one step at a time and see how far I can get with it. But the situation with establishing this relationship has required me to detail what we plan for the full process to get your thoughts on it. I'm thinking we may be able to do all of this with Toolset. If you agree with my logic on this support question, then the next one would be is it possible to create two posts of different post types through a single Toolset Forms submission. You can break that off into a separate support ticket if need be, or I can refile it by itself if you'd rather have me do it that way.
Hmm, that's interesting. From what I gather on the page you steered me to here, we can have something of a "relationship" established through the authorship of the Freelancer page that would be created as a result of the Toolset Form submission. Is that correct? It's not a formal Relationship using that Toolset functionality, but it could still be used to accomplish the same thing through conditional filtering on the post author name. Do I understand this correctly? If so, that *could* work for what we plan to do.
==>
Yes, as shared in the doc, you can just filter and display the post based on post author.
But then we will hopefully be able to use the same form submission to create a second post of another content type. I'm not sure if that will be possible or not. Let me know if that can be done. If it is possible, this second post will be one where the relevant applicant information will be displayed in different format and then under that information we'll have another form. Upon submission of the first form, we plan on notifications to be sent to all Board Members of the organization. So any time there is a new application, board members will be alerted. We hope to be able to include a link to the second post that is created from the initial form response in this notification. That form on the second post will be a form for Board Members to vote and provide commentary about the applicant. All votes will then be analyzed manually by the site admin and if the applicant is voted positively to become a member by the Board, the site admin will then manually publish the first Freelancer page that was created through the original submission. So the votes from the Board will need to be collected in and displayed by a view filtered by the username (Author) of the original form submission. That's where we needed the relationship between the user and the custom post type that I'm asking about. But if we can do this through the post author data, that should work, right?
==>
With Toolset form you can create the post for the post type for which the form is set to either create new post or edit existing post. You can not natively create two different post type posts using the single form until and unless you add some custom code using Toolset form hook: cred_save_data
However - My suggestion would be after you submit the one form you should redirect to user to another page where you should allow user to add other details belongs to the different post type and for that you should also create the Toolset form. Having said that you will have to create two form one for post type A and another form for post type B. Then when user submit the post type A form redirect that user to another page where you will offer them to submit the form type B form.
Another way would be (that will offer you more flexibility) to filter the content is you should create a post type "Application Memberships" with all fields you require and create a user form and when you create a new user, create one entry for the post type "Application Memberships" that means one user will have one "Application Memberships" post. Does that makes sense?
I'm starting the process on this now. Just wanted to let you know so you don't think I'm ignoring your informative reply. I'm going to go through this in a methodical step-by-step manner. Right now I'm working on just getting the initial post form set up to create the initial Freelancer page. Once that is set up and working properly, then I'll move to setting up the voting system.
I have determined that I don't necessarily need the original post form to create two posts of different types since you said it doesn't easily allow for the creation of two posts. I now think I can put the voting system on the first post that gets created, so long as I can keep that section of the post only visible to Board Members on the site with a conditional display. But I'll dig into this more in depth as I get to it doing this one step at a time. I'm just going to keep going with it to see how far I can get. I'm confident that we can achieve a basic version of what we're shooting for here. But as we go along, I'll post additional tickets asking questions to see if more advanced things we'd ideally like to achieve with this are doable.
I'll have more to ask on this shortly, so please keep this open. I'm resolving the other new tickets I've created first to complete step one of this system so I don't get too far ahead of myself and so I can keep everything straight.
I went with Minesh's suggestion to have two different forms. One post form creates a post of a custom post type, then I added the second form to the template for that custom post type. That's now working.
So far, I have not decided to try to tie this together with a user form to create a new user account as Minesh suggested in the "Another way..." paragraph. I may still change things around to add that capability. I just wanted to get the basics done first to keep my head from spinning too much trying to process all the possibilities. For now this will be a two step process where we tell the end users to create an account and log in before submitting the first form. If it can be done in one step instead, that would definitely be better so I'll look at that after I get everything else done with this. We're actually getting *very close* to achieving the dream system with this, *fully* emulating what we had in Drupal. We're already farther along than I thought could be done without substantial custom coding. All steps to this I have posted so far have been accomplished. I just added two more tickets that I don't think will be too hard to get for the next level. Then there is one more level that I'll get to after these two tickets are complete.
Please keep this ticket open a bit longer for if I try to go the user form route from Minesh's reply. That looks *very* complicated.