Esri / geoform-template-js

GeoForm is a configurable template for form based data editing of a Feature Service.
http://esri.github.io/geoform-template-js/
Apache License 2.0
67 stars 83 forks source link

fields reorder when using subtype with default values #498

Closed fnprice closed 8 years ago

fnprice commented 8 years ago

When a geoform is set up using a feature layer that has subtypes AND default values, the user specified field order doesn't appear to be honored. Fields that have default values will not appear until the subtype is selected. Once the subtype is selected these fields will appear at the top of the form directly under the subtype field. If either the subtype or the default value is removed the form works as expected. I can understand that fields with default values wouldn't be editable until the subtype is picked but maybe they could just be grayed out?

See example of issue below. There is a field with a default value (titled "field that moves") which doesn't appear until the subtype is selected. It is set to be the last field in the form. There is another field with a domain but no default value, which appears last on the form and does not move (titled "field with domain, but no default value doesn't move".

Example:http://arcg.is/1Ys1wYJ

driskull commented 8 years ago

Hi @fnprice. The reasoning for this is so the user doesn't have to see anything they can't fill out yet.

The order is not honored because users will fill out a form from top to bottom. If a field suddenly showed up above, they would likely miss seeing it because they would have to scroll back up and then back down to continue filling out the form. That's why its placed the way it is, to avoid inserting fields into areas that the user already completed or skipped past. Having them grayed out would still be an issue.

fnprice commented 8 years ago

Thanks, this makes sense. However, I can still see the domain values for that last field in my example before the subtype is picked. You probably have a reason for this but would seem to violate the logic above since different subtypes could have different domains.