Hi everyone,
I'm trying to pull a string with a pulldata in the calculation column of my Survey 123 Connect form. I pull this value as a text variable. Whenever a value is pulled, I found that it always has a leading whitespace when I import the text variable in a note. I tried pulling the same string from a hosted CSV and from a hosted table with the same result.
What is weird is that I don't see the leading whitespace directly in Survey 123 Connect (on the desktop app). I only see it when consuming the survey online on a browser.
Any idea as to why ?
P.S. All pulldatas in the joined example return the same leading whitespace.
@AntoinePrince1805 Try <div> instead of <span>
That however does have the "leading paragraph." The other thing that work was putting that particular not in the "hint" column instead of the label, both the leading space and paragraph didn't show then.
Doesn't explain it why it is happening, but it is a workaround.
Also, are all your pulldata's static text or will they be dynamic? The CSV only has one entry for each list. Why not just hard code the text into the html? When I hard coded that entry the leading space didn't show.
In the note that calls the avertissement_prp1 field you have an unbalanced html tag. Maybe that is causing the behavior. I bolded it in the snippet below. Delete it and see if that fixes your issue.
Thanks for pointing it out! But no, that is not the issue as the problem occurs in every pulldata.
Ok. My suspicion is that it is html related since it is occurring in a web form, and likely the <span> tag since that seems consistent across your fields. Span is an inline tag, so you would use it to change something that is in another html tag, like bolding and making the text red for one word in a paragraph.
I looked at some of my surveys where I use notes with html and I use the paragraph <p> tag or a heading tag <h1>, <h2>, <h3>.
If changing the span tag doesn't solve it, there is nothing I'm seeing in your pulldata that should be creating an extra space and you should consider a bug report to esri.
Thanks for taking the time. The <span> tag is not the problem. I tried using other tags with the same result. The only tag that seemed to eliminate the leading whitespace is the <p> tag, but only because for a reason that I can't explain, the <p> tag puts the leading space in its own paragraph. So instead of a leading whitespace on the line, I get a leading white paragraph which is worse.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.