Sauter la navigation

[Résolu] Direct apply (jobs) from front-end

Ce fil est résolu. Voici une description du problème et la solution proposée.

This support ticket is created Il y a 3 années et 9 mois. 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.

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)

Ce sujet contient 8 réponses, a 2 voix.

Dernière mise à jour par tualntM Il y a 3 années et 9 mois.

Assisté par: Luo Yang.

Auteur
Publications
#2141477

I'm a new Toolset user, being on board for less than a week now. I've read lot of forum posts these days, really amazed from your support.

I'm working on a job website - so far, I've managed to accomplish most of the thing I wanted, but I’m struggling with the final step, an “Apply button”.

Let me explain further, my site consists of following CPT and Relationships:
- Employer -> Job-Application [1-n, One to Many]
- Job - > Job-Applications [n-m, Many to Many]
- Employee -> Jon-Application [1-n, One to Many]
- Employee -> Jobs [1-1, One to One]
- have also created respective Relationship Forms

Some other details:
- Employer (User Form to Create Account/Create profile at the same time with custom code – Done)
- Employee (User Form to Create Account/Create profile at the same time with custom code – Done)
- Job (Post Form to Create/Edit a Job with proper access to Employer)
- [p.s. Content Templates for individual Job and Archive - Done]
- Job-Application (here it is where I'm stuck)

Long story short, I don’t know how to set-up Job-Application, custom-fields and how to make it work in front end. I mean, direct applying from the Front-End, so the Employee can Just click “Apply now” to apply for a posted job.

Let's say, at the individual content / or archive Template:

Job title
Description
Apply Now (creates an Application for the Job, from the logged-in user).

Can you please guide me how to achieve that?

#2141703

Hello,

In your case, since you are using Many-to-many relationship between post types "Job" and "Job-Applications", so I suggest you try these:
1) In the single "Employee" post, each user create the child "Job-Applications" post first:
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/

2) In the single "Job" post, display relationship form for connect current "Job" post with their own "Job-Applications" posts:
https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/

In the relationship form use CSS codes to hide other fields, and display the submit(apply) button only

#2141881

Hello Luo,

Thank you for your quick feedback, much appreciated!

As I'm still new to all this, do you think I've over complicated the workflow? The reason for above listed, is that I want to save the job-applications so the "Applicant" can see the status too. I've managed to create and set the needed access too.
Do you think the relationships are fine for this?

Back to the direct "application button issue", is there any way to integrate the two proposed steps into one? So the user can create the Job-Application and Apply at the same time at the single "Job" post?

I. An Employee (let's call it *Applicant* from now on) creates an login account & it's Applicant post.
II. An Applicant can browse the listed Jobs, and can apply (connect) it's Applicant post data to them.
III. Applicant can see the Job-Applications and their status.

EDIT: I'm open to change the workflow too, any suggestion is welcomed.

Please do let me know if it is clear, so I can try to rephrase it.

Again, thank you for your patience and support!

#2143385

Why do you need this relationship?
Job - > Job-Applications [n-m, Many to Many]

In most cases:
- one "Job" post can connect with multiple "Job-Applications" posts
- one "Job-Applications" post can connect with only one "Job" post.

So in my opinion, I suggest you try these:
1) Setup three post types:
- Employer
- Job
- Employee

2) Setup two post type relationships:
- one-to-many relationship between "Employer" and "Job"
- many-to-many relationship between "Job" and "Employee", enable Intermediator post type "Job-Applications"
See our document:
https://toolset.com/course-lesson/many-to-many-post-relationships/
You can also add custom fields into post type "Job-Applications".

3) So in the single "Job" post, you can display a relationship form for user to connect current "Job" post with his own "Employee" post, see the document I mentioned above:
https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/

This should be very easy post type structure.

#2143571

Hello Luo, thank you for your feedback, much appreciated.

Will do as suggested and will follow-up very soon,

Thanks again!

#2143615
This-is-a-job-opportunity-title-–-My-Blog.png

So, I've tried the above-suggested configuration.

I'm still where I began, because I cannot activate a direct "Apply now/Submit" button to the specific job.

I'm attaching a picture to illustrate it: the listed job is already pre-selected (which is perfect), but the current Applicant isn't.
I don't want that the user to search for himself at the filed, but to be pre-selected too.

So, my question remains open, how to connect the current logged-in user to the listed job? For a direct application.

Thanks!

#2143631

You can try these:
1) Create a post view:
- Query Applicants posts
- Filter by post author is same as logged-in user
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/
- In view's loop, display the relationship form shortcode, like this:

[cred-relationship-form form="MY-RELATIONSHIP-FORM" parent_item="[wpv-post-id item='$current_page']" child_item="[wpv-post-id]"]

Please replace "MY-RELATIONSHIP-FORM" with your relationship form slug

2) In the single job post, display above post view.

#2143693

Dear Luo, thank you for bearing with me on this. Appreciate it!

That was exactly what I wanted to achieve at this stage.

I'm marking this thread as resolved.

#2143697

My issue is resolved now. Thank you!