Accept numbers only in a text field in the Attribute Inspector with AGOL WAB

631
4
04-03-2017 11:15 AM
JoseSanchez
Occasional Contributor III

Hello everyone,

How to accept numbers only in a text field edited in the Attribute Inspector with AGOL  WAB?

Thanks

0 Kudos
4 Replies
DerekLaw
Esri Community Moderator

Hi Jose,

Why don't you just change the field type to integer, so it only accepts numerical values?

Hope this helps,

0 Kudos
JoseSanchez
Occasional Contributor III

Hi Derek,

I guest my question is more about how to check values entered in a field, in this case how to check that the values are numeric, but it could be something else.  What I do not understand in where in the source code from the Edit Widget I can verify that. I mean where in the source code can I get the values of the attributes changed in the feature edited.

The events  "_worksBeforeCreate:" and "_worksAfterCreate:" as far as I understood  are triggered by the shape. Once the shape finish to draw, it triggers them. I use the event "_worksAfterCreate:"   to populate fields with default values. 

 

For this specific field it could converted to an integer to avoid entering text, but the feature class that owns this field is currently digitized in ArcMap and this field gets populated most of the time correctly.

 Thanks

0 Kudos
DerekLaw
Esri Community Moderator

Hi Jose,

Please repost your more specific question in this forum,

Web AppBuilder Custom Widgets 

Hope this helps,

0 Kudos
JoseSanchez
Occasional Contributor III

Ok let me repost my question in  a more generic way.

0 Kudos