Can I Hide/Show a text box on my form or in my pop up also?

423
6
02-08-2021 08:25 AM
DougBrowning
MVP Notable Contributor

Is there way to add text to my form also?  The only option I see is to add Attributes.  

DougBrowning_1-1612801168730.png

What I am looking to do is Hide/Show Survery123 Form links based on a Visit Type.  I have 13 forms so it is too long to do line by line.  My idea is to have 2 diff text boxes, then use Arcade to Hide/Show them based on a field drop down with a Visit Type in it.

DougBrowning_2-1612801396994.png

 

In Map Viewer Beta you can add multiple Text boxes.  I would be cool to be able to Hide/Show those in my popup or form.  But only options are Delete or Duplicate.  But I am also seeing that Field Maps will only show the first Text box section of a popup.  The web map shows both but Field Maps only shows the first one.

DougBrowning_0-1612801151261.png

So I thought I could use the Conditional display in Field Maps but again I see no way to just add text.  Any have any ideas on how to do this or if it is coming?

Thanks a lot

0 Kudos
6 Replies
XanderBakker
Esri Esteemed Contributor

Hi @DougBrowning ,

It is not entirely clear to me why you want to add text to the form. Does this include an explanation about what needs to be done? Field Maps can show custom HTML in the pop-up (as far as I know). You can use divs to group information and use an expression to define the visibility in HTML.

To show certain fields depending on the situation is something that can be done with Field Maps. You can create a group and apply conditional visualization on a group of fields or on the field level:

XanderBakker_0-1612805750975.png

See below the simple expression used in this case to hide fields that requires the user to specify the problem in case no problem was detected in the field.

XanderBakker_1-1612805935111.png

And this is how ArcGIS Field Maps will present the form depending on the situation. Specify the details:

XanderBakker_2-1612805980454.png

... or not...

XanderBakker_3-1612805994620.png

 

0 Kudos
DougBrowning
MVP Notable Contributor

Well in 123 land I do tons of dynamic text.  Kind of surprised a form would not have text actually.

Warnings

DougBrowning_0-1612810174088.png

Summaries

DougBrowning_1-1612810209705.png

Informational images

DougBrowning_2-1612810276418.png

A form is way more than just fields.

In your examples you are hiding Fields but I want to hide text.  BTW Field Maps is refusing to show more than one text box from Map viewer beta.  

My particular use case is If it is Visit 1 collect forms 1, 2, 3 and if it is your second visit collect forms 4, 5, 6.

Only idea i got now is dynamic text.

First visit

DougBrowning_3-1612810472813.png

DougBrowning_4-1612810516498.png

Then vice versa.  thanks

 

 

 

0 Kudos
DougBrowning
MVP Notable Contributor

I heard from the AGOL team that they are going to add way to conditionally hide text boxes.

Hopefully Field Maps will then be able to handle multiple text boxes.  This way my popup can change dynamically based on fields.

thanks

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi @DougBrowning ,

Field Maps already provides conditional visualization of fields using Arcade expressions as shown above. The same behaviour can be seen when opening the map in the Beta Map Viewer (if it is not there yet, it will be soon). 

What I am wondering is if you want to show a text (not a field) in the form (just as you can in Survey123)? I hope you won't add additional fields with text in order to mimic this behaviour, because I don't think that is the way to go.

0 Kudos
DougBrowning
MVP Notable Contributor

Sorry Xander I do not think I am explaining it correctly.

Here is an image.  In the new Map Viewer beta you can have multiple text areas in your pop up vs just 1.  Not a form but the pop up.

So the idea I have is to have 2 text areas and pick which one I want to show based on the feature type.  Say if it is a Visit I show text box 1 and if it is a revisit I show text box 2.  Or a crew vs a manger lets say.  Would be way easier than having 2 maps.

DougBrowning_0-1613057309838.png

Does that make more sense?  AGOL team said they are adding this at some point.  The issue seems to be that Field Maps is not showing the second text box, just the first.

Thanks

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi @DougBrowning ,

 

Thanks for the explanation. It makes sense. I would have to do some tests to see what is happening and if I can reproduce it. In the meantime, let me CC @JeffShaner who knows everything there is to know about the product.