I am trying to create a mobile application for field use, but the pop-up editor is too small. It's discussed here in this blog: Editing pop-UPs got you DOWN? | ArcGIS Blog
Are there any tutorials that cover how to do this in the Esri JS API?
You might also want to take a look at this sample:
Attribute editing - mobile | ArcGIS API for JavaScript
There is some good info on divintohtml5 about creating forms that make it easy for users on mobile devices to input info.
Basically you just want to create a form and then when users enter the info and click some form of submit button you use the Feature Layer applyEdits method to write the attribute info to the service. I think I sent you the code to the Graffiti app? If so that app uses a custom form and applyEdits to add a feature so its one example of how to accomplish the task.
You did send me that code, but I just didn't know how to integrate the code into my app. I am just trying to understand how to make the edits apply to the feature service and I am not getting it. The editing widget does it all for you.
So if you aren't using the editor you need to handle the updates. You can do so using FeatureLayer.applyEdits. The Edit without Editor sample in the help shows how this works. Basically you create a new graphic using the input geometry and assign the attribute (which you get from the form).
var attr = { "email": dom.byId("report_email").value || null, "description": dom.byId("report_desc").value || null, "date": dom.byId("report_date").value || null }; graphic.setAttributes(attr); graphic.setAttributes(attr);
Then use applyEdits to add the feature.
featureLayer.applyEdits([graphic], null, null.......
I like the answer before this one best, but I need to learn bootstrap. Needing to learn what causes the form to pop-up. But I'm going to try and modify this one for my project. Thanks.
Just one question on this one. How do I determine the feature that was clicked on?
We use a couple html drop downs and table forms to create table records for our inspection, like Kelly mentioned, then just stuff it in a TitlePane. Works pretty well so far.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.