WebForms not loading data from entities

Hello all,

I’m not sure if it’s an issue or not in terms of expected functionality but while using WebForms I noticed that preloading data from an entity is not working as it is in Enketo or Collect.

1. What is the issue? Please be detailed.

I have a form that selects one entity from an entity list and preloads its data into fields like name, social security, geopoint and others. The purpose is having the field agents reviewing that data and making adjustments as needed.

While using Enketo or Collect everything works well, but on WebForms the data is not preloaded and the fields remain empty.

2. What steps can we take to reproduce this issue?

  • Create a form that creates entities
  • Create another form with a select_one_from_file entity.csv field (called “Producer” for example)
  • In this second form create the fields for preloading data and add calculations for each one as instance('producers')/root/item[name=${Producer}]/full_name

3. What have you tried to fix the issue?

Nothing as I don’t know if that is something not implemented yet or a bug :slight_smile:

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

Hey @rfvieira We couldn’t reproduce the issue yet, but we’re still trying :wink:

Is it possible for you to share the form? If not that’s okay!

Is the form with select_one_from_file the Entity Update form?

Could also tell us which version of Web Forms are you using?
You should see a number at the bottom of the Web Forms screen, it should looks like that:

Screenshot(444)

Hi @Szymon_Rujner ,

I’ve created two sample forms do reproduce the error that contains significantly less information but still use the same approach, then tested here and got to the same issues.

I’m using v0.23.1 of the WebForms too, my server versions are:

versions:
020d5a7ce018148beb8e968d50eec3a81d1bd98c (v2026.1.1-1-g020d5a7)
 96b8937f314af34affcaead068bac83dfa1e4bdf client (v2026.1.0)
 142c1c85501d90d225116862ba79dd914c5fcfc1 server (v2026.1.0-3-g142c1c85)

This one creates the Produtores entities:

AddingProducerEntities.xlsx (21.3 KB)

This is a sample entity list to import on the server:

produtores.csv (159 Bytes)

And this last one is the bad behavior form

WebformNotLoadingProducers_Error.xlsx (21.2 KB)

Thanks for your help!

Please let me know if you find any issues in the form design, I might be misunderstanding some concepts an having your comments here will be a great learning opportunity for me.

Cheers,

Thanks for sharing the form @rfvieira, that does indeed reproduce and looks like a bug! When I change the initial selection I see the defaults populated as expected.

@Szymon_Rujner I also couldn't reproduce last week with producers.zip (15.5 KB) but now I've reproduced with a much simpler form. I've filed at https://github.com/getodk/web-forms/issues/790

Thanks @LN and @Szymon_Rujner!

I made some more tests here and the behavior change a bit:

The first time I select a producer on the list the fields ARE NOT populated in the WebForm as they are in Enketo or Collect.

But if I change the selection box a second time, choosing a different producer, the values ARE loaded in the corresponding fields.

From there on it starts working correctly.

Weird :frowning:

Thanks for reporting! I’ve managed to reproduce your exact issue reliably, and have a fix ready for review which I expect will be released in the next version of web-forms.