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:
- 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.
- Now go to the editor and open the Available Jobs dynamic item page, where you are showing the additional information for the particular job.
- Create your custom form using Inuput Elements that the applicants will fill out. Learn more.
- 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.
- Then select the three dots besides this newly created dataset and click on Dataset Settings and set the Dataset Mode to Write.
- 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.
- Once this is set up, add a dropdown field in your form and set it to Collect Content.
- Then select the Applications dataset and under Value connects to link it to the Job Name field.
- Then just below that, under Show List Options turn on Show options from a collection.
- Choose your Available Jobs item dataset and set the Labels and values connects to the title / name of the job.
- 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.
- 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.