Streamlining Job Applications: How to Automatically Save Job Titles in Wix CMS

Hi, I’m building a job board on wix Studio on my website and need assistance with the job application process.

I have two CMS databases:

  1. #avaliableJobs: This stores the job listings, and users can select a job to apply for. This also functions as both a dynamic page list and individual item pages.
  2. #Applications: This stores the application data, such as the user’s name, email, expected pay, curriculum, description, availability for on-site work, and contract preferences (based on the application form).

My goal:

When a user selects a job from the #avaliableJobs database on the dynamic page list and clicks a button to view more about the job details on the dynamic item page, I want them to fill out a custom application form. Once submitted, the application data should be saved in the #Applications database.

I want the job title (from the #avaliableJobs database) to be automatically saved in the #Applications dataset when the user submits the form.

My question:

How can I ensure that the #Applications database receives not only the application details (like name, email, etc.), but also the job title from the #avaliableJobs database that the user selected to apply for? In other words, how can I link the job data from the listing in #avaliableJobs to the user’s application upon form submission?

There are two ways to do it. One is an easier workaround that simply submits the Job Title as a text along with the application form. The other method establishes a link between both collections using a Reference field, and involves a little bit of code.

Now since you simply want the Job name along with the applicant’s detail, here’s how to do it:

Here’s how you will have to set it up:

  1. In your #Applications database, add a new Text field. This will contain the name of the job that the applicant is applying for so you can name this Job Name or anything else that is relevant.
  2. Now go to the editor and open the Available Jobs dynamic item page, where you are showing the additional information for the particular job.
  3. Create your custom form using Inuput Elements that the applicants will fill out. Learn more.
  4. Then click on the Connect to dataset icon (which looks like a little snake) on the first input field, and then from the dataset panel on the right, click on View All Page Datasets and click on Add A Dataset and choose your #Applications collection. Then click on Create.
  5. Then select the three dots besides this newly created dataset and click on Dataset Settings and set the Dataset Mode to Write.
  6. Then click on your input fields one by one and connect them to this newly created Applications dataset by linking the field values to the relevant columms.
  7. Once this is set up, add a dropdown field in your form and set it to Collect Content.
  8. Then select the Applications dataset and under Value connects to link it to the Job Name field.
  9. Then just below that, under Show List Options turn on Show options from a collection.
  10. Choose your Available Jobs item dataset and set the Labels and values connects to the title / name of the job.
  11. Then select your dropdown again, and under Show Initial Text, choose Item from dropdown. Also, make sure that it is set as Required. You can name this dropdown to Select the job you are applying for but the key here is that since it is on the dynamic item page, it will only contain the name of that particular job. The user will have to select the name by clicking on the dropdown in order to submit the form.
  12. Then finally, add a button at the very bottom of your custom form, connect it to the Applications dataset, and set the click action to Submit. This will act as your form’s submit button.

And there you have it - your applications will now automatically have the name of the job added to the other details, thanks to this dropdown hack that we used. Test it out on the live site to see if it’s working as expected.

NOTE: If you are encountering errors while submitting the form, then you need to change the Collection Settingns of your #Applications to Collect content. Learn more.

1 Like