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

enableAttachments not working #537

Closed AlejandroPeq closed 7 years ago

AlejandroPeq commented 7 years ago

Hello,

I'm trying to make an application using Geogorm template. However I've noticed that something is not working properly.

I'm going to share you a screenshot where I've introduced on the default.js my webmap id and set the option "enableAttachments" as true.

screenshot1

My webmap has a lyer with the attached files option enabled, so it should work. As you can see in the first screenshot , the wemap id is visible (This is because is public if you want to check anything more)

id webmap: 1ae33d4e98c74cab8f4cb3a1933b04b9 layerService: https://services6.arcgis.com/2U433HSn0CeK0QUN/arcgis/rest/services/lyer_m%C3%B3stoles/FeatureServer/0

However I can see the two fields that the lyer has, but not the button which let me upload files.

captura2

This is working properly using the arcGIS Online Builder with the same example.

screenshot3usingagolbuilder

So, could you please review this? It seems not to be working properly using the template with the default.js

Thanks in advance

driskull commented 7 years ago

Hi @AlejandroPeq , i'm unable to see that webmap/layer. However, what you have should work. Can you share where its not working so I can debug it?

AlejandroPeq commented 7 years ago

geoform.zip hi @driskull,

Sorry, I've used all the credits of my organization so, now it's blocked.

I've created another organization, with a new webmap and a new lyer for testing purposes.

Of course , it happens the same... using the online builder everything is ok, but using the geoform template and the default.js config file not.

Webmap: http://pruebasalejandro.maps.arcgis.com/home/webmap/viewer.html?webmap=4edb0beb7ad34eefacb590df3a871d39

lyer: http://pruebasalejandro.maps.arcgis.com/home/item.html?id=71a18284673f4a9b850c6190c3a6b96b

Sorry for inconvenience,

Thanks for everything

driskull commented 7 years ago

no problem :)

Try this in the config:

"attachmentInfo":{
        "TestingLyer_8554": {
            "enableAttachments": true,
            "attachmentIsRequired": false,
            "attachmentLabel": "",
            "attachmentHelpText": ""
        }
    },

https://github.com/Esri/geoform-template-js#attachment-text

AlejandroPeq commented 7 years ago

Great @driskull now it's working! . Why it's neccesary completing both sections ? on the online builder, you just need to confirm one check for the attachment use.

Thanks for everything

driskull commented 7 years ago

I'll have to investigate. I think the second option is so that you can have some layers with attachments on, and some off.

I'm not sure why the first option doesn't take default if nothing is supplied on the second one.

AlejandroPeq commented 7 years ago

Thanks for everything @driskull

closing the issue.

Regards