Prefill fields via URL in Enketo

Hello

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.

https://help.ona.io/knowledge-base/how-do-i-prefill-form-fields-using-enketo-express/

I’ve tried this and similar with no luck to polulate data/visita_SPV field:

http://67.205.154.75:8001/admincapris&form_id=‘aa84ppstK5QtruwFkgZBDZ’&defaults[/data/visita_SPV]=6699

https://ee.kobotoolbox.org/::KdZG6c4D&form_id=aa84ppstK5QtruwFkgZBDZ&defaults[/data/visita_SPV]=6699

etc…

What am I doing wrong?

Thanks!

Hi,
Your syntax is wrong
Should be

https://ee.kobotoolbox.org/::KdZG6c4D/?&d[visita]=6699&d[text]=anytext

in order to fill a fiel called ‘visita’ with the value ‘6699’, and a field called ‘text’ with the value ‘anytext’

Regards

1 Like

Hi @areyal
Welcome to the community forum. Thank you for your post and chiming in on this.

Stephane