So I have a need for a GeoForm that will concatenate multiple fields into a single field.
Currently I am using the GeoForm to create 'Pending Addresses' inside the Site Address Points from the Local Government Model.
I have already worked with the GeoForm GIT Editors and they have customized the form to offer the ability to 'Lock' a field so that it is VISIBLE but not EDITABLE to EndUsers. Basically, in the JSON under [form folder]/config/default.js you can create an assortment of attributes for 'fields' made available in the form. The KEY attribute being the "name" attribute which identifies the Feature Class field this HTML form will be pushed into.
Well, using the newly updated [form folder]/js/main.js file you can now add "locked": true and that field will be greyed out and uneditable to end users. Something MUCH needed for my current (and many future) project(s).
Think "THIN" Attribute Assistant for the GeoForm. (very thin)
Basically, in this current instance (Site Address Points) I want to be able to display the FULLADDR and FULLNAME fields from SiteAddressPoints AND have them Auto-Populate with the concatenated contents from other fields.
Specifically from ADDRNUM, PREADDRNUM, STREETNAME, STREETTYPE, ADDRNUMSUF, UNITTYPE, UNITID
So my questions are as follows:
- How would I format my JSON in [form folder]/config/default.js?
- How would I set that form field to auto-populate from a concatenated collection of other form fields?
- How would I make that concatenation editable?
(i.e., How do I allow the concatenation to do things like FIELD1 + " " + FIELD2 + ", " + FIELD3)
- I know I need to edit [form folder]/js/main.js but I feel like I will need a custom Method/function and I'm not sure where the best place to put that would be? (i.e., in a separate file, at the bottom of main.js, etc)
I am numbering them so that answers can be assigned to those numbers.
As I need to get this process moving I have also posted this question over at Stack Exchange in case anyone else is following this and also uses Stack Exchange.