I am trying to pre populate fields in a survey via a URL variable or query string.
So far I’ve found 2 articles regarding this but I’m still unable to do it neither in form hosted by kobo nor slfr ohsted in my servers.
I’ve tried this and similar with no luck to polulate data/visita_SPV field:
What am I doing wrong?
Your syntax is wrong
in order to fill a fiel called ‘visita’ with the value ‘6699’, and a field called ‘text’ with the value ‘anytext’
Welcome to the community forum. Thank you for your post and chiming in on this.
I’m following the Syntax above, but I’m not seeming to get my fields to pre-populate? Is the pre-population invisible? Am I doing something wrong?
:: disappears from the URL in front of form ID when I submit the URL
@knoxjohnny, you could do it as outlined in the image shared below by adding
?d[Q1]=Apple behind the survey URL. Note,
Q1 is the variable name for the survey project shown in the example.
In the survey tab of your xlsform:
Data entry as seen in Enketo:
Enketo Prefill.xlsx (10.0 KB)
Do you mind sending your XLS form so that we can look at it? It seems that this name may be having an issue.
The hypothesis that I need to test:
- Use of an underscore in the name does not work with prefill ( testing approach; change the name to staffname)
- Prefill does not work with a long-form (testing approach; remove all other questions except that one and test)
@Kal_Lam Yes I was using the Column Name. See here:
I will send the XLS in DM.
@stephanealoo I created a quick demo form to test your idea. and it looks like I was able to get information with combination of all your ideas:
long test as well as
_ in name… Loom | Free Screen & Video Recording Software
I have the same problem. The URL fill works in a test form but the same syntax does not work in the existing form that I need to change. Were you able to find a solution to this?
I found the source of the issue in my case. The existing form has sections, so rather than just passing the value to [country] I have to pass it to [intro/country].
Thank you for sharing this with the entire community, @naledi_h!