Select to view content in your preferred language

Carriage return formatting for text fields in Pop-ups

170
4
Jump to solution
Tuesday
JasperRomero
Occasional Contributor

Hello,

I am formatting pop-ups to display interpretive information for walking tours.

For each POI, the general description of the site comes from the field "Introduction." In some cases this is a single paragraph, but in other cases it is multiple paragraphs.

What is the best way to ensure that carriage returns (i.e. new lines) are formatted correctly and displayed in the pop-up? There does not seem to be any way to input the return into the text field manually through the Web Map editor - hitting Enter, Shift+Enter, or Alt+Enter just jumps to the next field. Is there some trick for this?

I have noticed that when the features are updated from an Excel sheet and the carriage return is included in the formatted Excel sheet it usually displays correctly, but it seems like if the field is then edited in AGOL this formatting can be lost. I am setting up a workflow for end-users without extensive GIS background, so I would like to minimize the complexity required - frequently saving, editing, and uploading spreadsheets to update features is not ideal.

My next idea is to include each paragraph as its own field, and use an Arcade script to display the paragraphs and empty lines as appropriate - but this seems absurdly overcomplicated to just display text with paragraph formatting.

Am I missing something obvious?

Thanks in advance for any information!

0 Kudos
1 Solution

Accepted Solutions
MarkBockenhauer
Esri Regular Contributor

Ah..  that explains it.   Yes, you can modify the editing experience using a form.  Click the configure editing button, drag the fields that you want users to edit into the form area.   For single line text fields you can change it to multiline.

 

formauthormulitline.jpg

 

View solution in original post

4 Replies
MarkBockenhauer
Esri Regular Contributor

Hello @JasperRomero ,

Are you using a popup text element? 

I tried a simple test with Arcade popup element and Text popup element and I see that returns are accounted for in the text popup element.    The Arcade popup element looks to be processed as html perhaps?  if I put html tags in the string (ex. br) they are honored.   Anyway, does the popup text element work for you?

 

MarkBockenhauer_0-1756903806354.png

And this is what I typed in the form.

MarkBockenhauer_1-1756903835479.png

For the Text element popup definition I have this:

MarkBockenhauer_2-1756904033995.png

 

Mark

0 Kudos
JasperRomero
Occasional Contributor

Hi @MarkBockenhauer , thanks for taking the time to look into this!

I don't have the same view that your screenshots show - would you mind describing how you configured the layer, table, and/or form to get the large text box for the Description field? Whether as part of a Form, or just accessed through the Edit feature menu with no form configured, my Introduction field (Text, 1000 char. limit) does not display a large text box - just a single, sidescrolling line in which any Return jumps to the next field in the table. Maybe I am missing something very simple about the optimal configuration!

It looks like inserting <br> in the text does have the desired effect, but I would like to allow end users to simply enter and edit text normally if possible.

Thanks again for the assistance!

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Ah..  that explains it.   Yes, you can modify the editing experience using a form.  Click the configure editing button, drag the fields that you want users to edit into the form area.   For single line text fields you can change it to multiline.

 

formauthormulitline.jpg

 

JasperRomero
Occasional Contributor

Aha, game changer! Thank you @MarkBockenhauer! I will play around with this, but I think it's what I needed (assuming formatting from a spreadsheet upload is still preserved here as well). 

0 Kudos