When prefilling the value in Enketo Web Form the space is getting replaced with a +

1. What is the issue? Please be detailed.
After upgrade to 2025.2 When prefilling the value in Enketo Web Form using the get parameter then if passing a value which has space in between then the space is getting replaced with a +

For example if I open
URL/submissions/new?d[/data/overview/responder]=Ashutosh%20Mundra

Then the Responder field is getting Prefilled with Ashutosh+Mundra

2. What steps can we take to reproduce this issue?
Open an existing form in a web browser (Enketo) and add a GET parameter to prefill a text field. If the value contains spaces, they will appear as '+' characters in the displayed form.

3. What have you tried to fix the issue?
Nothing as yet

4. Upload any forms or screenshots you can share publicly below.

what if you try encoding the space into the URL as a + instead of as %20?

suggestion based on this: https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20

Thanks for the feedback. I have tried sending + instead of %20 but unfortunately same result

URL/submissions/new?d[/data/overview/responder]=Ashutosh+Mundra

Hi @Ashutosh_Mundra

We have fixed this issue in the latest version of Central i.e. v2025.2.2

Thanks,

Sadiq

3 Likes

Hi Sadiq,

Thanks for sharing the update. But I think the issue is still not fully resolved. When I am opening the link for the first time with pre fill data having space then space is still getting replaced with +. After that if I again replace + with space in the URL only then the pre filled value comes with space please.

URL?d[/data/customer_ref]=TEST%20adv%20GRIFFIN%20-%20Cancelled%2001-01-2021

:frowning:

Which browser are you using? When you click on the link, do you see login page first and then redirected to the actual Form?

Hi Sadiq,

I've tested this on the Chrome browser, and the issue persists in both scenarios: whether I'm already logged in and the form opens directly, or if I'm prompted with the login window before the form opens. The pre-filled value only displays correctly with spaces if I manually replace the "+" with a space in the URL after the form has loaded and reload the form.

Thanks,

Ashutosh

I see this happening only when login is prompted but not when Form is opened directly.

When you open a link (I am assuming by click a hyperlink), do you see %20 or + or (space) in the URL?

Is it possible for you to share a screen recording with me via direct message?

Hi Sadiq,

Thanks for the response.

I see this issue even when the form opens directly. Not sure if this make any difference but I am trying to prefill multiple fields in the form.

When I open the link I see %20 in the URL and that changes to +

Sure I can send you the video, how to do that please?

Hi Sadiq,

Thanks soo much for your support and help with this issue. Posting what we were able to find regarding this issue so that others members may refer if they find similar issue.

  1. When we used the link with enketo IDs e.g., https://main.domian/-/ABCDEFGHIJKLMNOPQRST?d[/data/firstname]=sadiq%20khoja then issue was coming where space was getting replaced by +

  2. But then Sadiq helped with an alternate URL where we used link like normally ODK opens when we try to make a new submission by clicking submission button in ODK https://main.domian//projects/1/forms/Customer/submissions/new?d[/data/firstname]=sadiq%20khoja then it resolved the issue and the name is coming with space (without +)

1 Like

Hi @Ashutosh_Mundra

We have released a patch of Central (v2025.2.3) which resolves the space encoding issue when redirection occurs either because of user is not logged in or using old URL (one with the /-/).

One additional change in the release is that if you ever wish to include + in the prefilled value you would need to encode it i.e. use `%2B.

2 Likes