JS API 4.X: Editor widget - FormTemplate cannot have empty array of elements

10-06-2022 07:26 AM
Regular Contributor

Dear JS API team,

I am wondering what is it not possible in the editor widget to have an empty array of elements in the FormTemplate ?


If you set an empty array, all the attributes appear. You need to have at least one.

In my use case, I just want user to edit the geometry.


In the meantime, any workaround to suggest ? 


Thanks for listening !

Tags (1)
0 Kudos
1 Reply
New Contributor III

Rather brute-force way but you could do the following:




Add the above to your CSS.



            const editor = new Editor({
              view: view,
              layerInfos: [pointInfos],
              allowedWorkflows: "update"


Tweak the editor with the last line of the code: allowedWorkflows: "update".

Your users will only be able to select a feature and then update its geometry - the attributes will be hidden.


0 Kudos