Question:
I am currently scoping out functionality for a recruitment page for my website. Ideally, I will buy a job board widget to put on the website, but crucially, because I want to collect form fills in the website, I want to use Wix Forms to capture job applications.
I have created a form https://www.rehabilityuk.co.uk/apply-for-a-job and want to create a URL that will autofill the job that someone is applying for when they click apply from the job board I have tried to do this by creating a simple URL https://www.rehabilityuk.co.uk/apply-for-a-job?what_job_are_you_applying_for=Software&Engineer
But it isn’t working so what do I need to change in the URL to get this functionality to work or is there a specific setting in the forms I need to toggle?
Product:
[wix editor ]
What are you trying to achieve:
[create a URL that will work with wix forms to prepopulate a field with defined text when the URL is clicked from another source in this case a link in a third party widget]
What have you already tried:
[I had a go at creating the URL from online tutorials.]
1 Like
Hi, @David_Thompson !!
I believe it’s certainly possible to use query parameters for autofill, but you would need to first retrieve them on the page and then set the values into the form. Also, the query parameter in that URL seems to be incorrect.
If “Software&Engineer” is intended as a single value, then it should be properly encoded beforehand. Since the value itself contains an &
, it will likely be interpreted as a separator unless encoded. The &
symbol is a special character in URLs. 
Please take a look at the following link for reference.
You could also just add the edited form field value to the URL as, for example, https://www.rehabilityuk.co.uk/apply-for-a-job?selected=engineer
import wixLocation from 'wix-location';
$w.onReady(function () {
const what_job_are_you_applying_for = wixLocation.query.selected;
console.log(what_job_are_you_applying_for)
})
In this instance, the value passed to what_job_are_you_applying_for when loading the page would be “engineer”.
To avoid errors, you will need to make sure that the field values used to create the URL are in lowercase and that any special characters like & or _ are encoded (or avoided).