Hello,
I spent a few days searching these forums and I don't seem to find a solution. Please excuse me if this has been resolved somewhere and skipped my attention.
I'm building a staffing agency website where customers can place a job and employees apply to them.
I have a parent CPT called JOBS and a child CPT called APPLICATION.
I'm trying to limit the number of applications to 1 per user.
What might help me is one of these options:
A- a way to detect the number of posts the current user has for the current child post (if 0 allow if 1 hide)
OR
B- I embedded the APPLICATION cred inside a view list of JOBS and hid all fields except the submit button. I also created a custom field called JOB_STATUS on the APPLICATION cpt with value 1 or 0. If a user already applied to a job, this field should exist and have default value of 1. I am unable to read the value from the view list.
Here is my conditional code:
[wpv-conditional if="( '[wpv-post-taxonomy type='level' show='slug' format='slug']' eq '[wpv-current-user info='role' show='slug' format='slug']' )"]
<td>[wpv-post-id]</td>
<td>[wpv-post-link]<br>[types field='job-notes'][/types]</td>
<td>[wpv-post-author]</td>
<td>[types field='start' style='text' format='F j, Y (g:i A)'][/types]</td>
<td>[types field='finish' style='text' format='F j, Y (g:i A)'][/types]</td>
<td>
[wpv-conditional if="( $(wpcf-status) eq '2' ) OR ( $(wpcf-status) eq '3' ) OR ( $(wpcf-status) eq '4' )"]You can't apply to this job[/wpv-conditional]
[wpv-conditional if="( $(wpcf-status) eq '1' ) "][cred_form form="apply-form"][/wpv-conditional]
</td>
<td>[types field="job-status"][/types]</td>
[/wpv-conditional]
OR
C- if you propose a smarter way to achieve this. I only need users to apply once.
My website link is lien caché
Thank you,