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

Configure field in the defaults.js - changes do not apply to map #532

Closed STGiese closed 7 years ago

STGiese commented 7 years ago

How can I configure the fields shown in the geoform by customizing the default.js? I know that there is a fields-option where I can set an alias, the displayType an so on, but the changes do not apply to my map... The service-properties are shown below: { "currentVersion": 10.31, "id": 1, "name": "Bürgerbeteiligung LPGT - Festsetzungen", "type": "Feature Layer", "description": "", "copyrightText": "", "defaultVisibility": true,

Any hints??? Thanks in advance!! :-)

driskull commented 7 years ago

hey @STGiese the readme has infor for configuring the fields from the defaults.js

https://github.com/Esri/geoform-template-js/blob/master/README.md#configuring-fields

STGiese commented 7 years ago

Actually I don't know, what is the Parameter "GeoForm_Sample_3731" in the readme-sample... What ID do I have to enter there????

fields:{ "GeoForm_Sample_3731": [{ "name": "email", // field ID

I read these instructions, but they don't apply anyway... Here is my code (where "vorname" is the fieldname in the database and "1" the ID of the layer - see my first posting...).

"fields": { "1" : [{ "name": "vorname", "alias": "Ihr Name", "visible": true, "displayType": "textarea" }] }

It doesn't have any effect :-(

STGiese commented 7 years ago

With the developertools enabled in Firefox I could manage to find out the correct ID... It was tricky, but it worked :-)