TypeError: Cannot read properties of null (reading 'textContent')

I would like some help with a form that is throwing this error:

I’m not sure what this means. For context, I’ve tried the below but haven’t been able to get it to work:

  • The English language translation only had label instead of label::English. I changed this on both the choices and survey worksheets. Also noticed that the Hint had a French translation but did not have English indicated for the column that had English. I changed this as well.
  • I removed all columns that had headers but no data on them from the external CSV files attached to the form.
  • I removed the list_name column from the external CSV files
  • I also checked the name column on the survey and choices worksheets for any special characters. It seems there were none.

Kindly assist

Welcome to the community @eonyango21,

Do you have autocomplete written in your appearance column with select_one_from_file type question?

1 Like

Thanks @hakan_cetinkaya. Not at all. Not using autocomplete.

Did you check your form with the Online validator? This is always recommended during development and before deployment, please.

1 Like

Yes I did. There were no errors @wroos

@eonyango21, maybe you can share your CSV file with the community. I assume there should be some formatting issue in your CSV file.

@Kal_Lam , I’m not sure how I can do that since it says I’m a new user and I cannot upload attachments because of that.

@eonyango21, you should now be able to. Would you mind giving another try?

Thanks @Kal_Lam. Please find attached
rw_sp02_request_v1.xls.xlsx (26.9 KB)

These are the associated CSV files
Admin2CD.csv (798 Bytes)
Admin3CD.csv (10.6 KB)
Admin4CD.csv (8.9 KB)
Admin5CD.csv (38 Bytes)
sp_register.csv (3.9 KB)

There was an important warning from the Online validator. You should you add the language codes, please. See cited link.

The following language declarations do not contain valid machine-readable codes: French, English. Learn more: http://xlsform.org#multiple-language-support

Tried this but didn’t work as well

Seems I figured it out:

  • The choice_filter for the sp_id_auto field would require you to add something to ensure that the form can run. I added First_Name=foo to this.
  • The pulldata() functions that read from sp_register e.g pulldata('sp_register', 'Family_Name', 'name', ${sp_id}) refer to name a column that does not exist in sp_register.csv . This doesn’t necessarily prevent the form from running though. The first bullet explains why there was an issue running the form.

Perhaps, you may also try true() to satisfy the choice_filter.

Would you mind, please to share the updated form with the community, as the example could help others too?

Sure. Find attached
rw_sp02_request_v2.xlsx (175.7 KB)

1 Like