I have created a Custom Module to display job listings. In the Detail view, all the job info is displayed with an Enquiry Form below it. How do I auto populate the “Job ID” input field with the Job ID field I created?
Hi @designagirl You need to indicate the field which renders Job ID in this input value, the same thing you render above. If this doesn’t help, please submit a support ticket and someone from our team will check it out.
So an example in code of what Violetta is saying might look like this:
<input type="text" name="jobId" value="{{this['jobId']}}">
However, if your form is placed in the detail layout as a component tag, the above example wont work as you need to pass that ‘jobId’ value into the form layout via the component tag. So you’d do that via a custom parameter like this:
{% component type: "form", alias: "your_form_alias", myJobId: "{{this['jobId']}}" %}
Then in your form code you can use:
<input type="text" name="jobId" value="{{params['myJobId']}}">
1 Like
OMG. It works! Thanks a million Adam.