So I am using the GeoForm so that our Permitting department can add address points that do not already exist and apply permits to those newly created address points. The problems I am having are that :
So my current attempt to adjust this field was to try to have the field be invisible to the end user of the GeoForm and create a DefaultValue for the field inside the GeoForm config/default.js file. I figure if I can adjust this then I could use JS to get the adjustment I wanted. But nothing I do causes the defaultValue to change anything if the field is invisible. I do NOT want the user to even see the SiteAddID field because I fear they will cause issues somehow. Just make it invisible and modify the input... Much like using the Attribute Assistant on Desktop.
Can anyone help me?
Solved! Go to Solution.
driskull corrected the situation by editing MAIN.JS in the GeoForm.
Here is his correction.
default.js : locked attribute doesn't work · Issue #550 · Esri/geoform-template-js · GitHub
So I've tried adjusting the JSON.
"name": "SITEADDID", // field id
"alias": "Site Address ID", // label
"fieldDescription": "The ID of the address point", // Help text
"visible": false, // show this field?
"typeField": false, // subtype field?
"tooltip": "", // placeholder text
"displayType": "text", // text, checkbox, radio, textarea, url, email
"defaultValue": "GF" + new Date().getTime(),
"locked": true
You would THINK that changing Visible to False would NOT affect this field working as it is entered in the JSON... But it does. If you make this field VISIBLE:FALSE then the DEFAULTVALUE that I created doesn't actually enter into the newly created Address.
But if I turn is VISIBLE:TRUE then the enduser can change the contents of the field NO MATTER WHAT THE LOCKED ATTRIBUTE IS SET TO.
I cannot begin to describe my frustration level.
You can see that the field doesn't get greyed out.
Pending Addressing - Edited - YouTube
And you can see that even tho it is locked, I still edited it via the GeoForm.
Apr 4, 2018 4:51 PM - Edited - YouTube
Frustrated beyond belief.
driskull corrected the situation by editing MAIN.JS in the GeoForm.
Here is his correction.
default.js : locked attribute doesn't work · Issue #550 · Esri/geoform-template-js · GitHub