schema.xmlinside of our
itemmodel, add another field by typing
fieldand inserting the auto-complete suggestion, then populate the field as shown below. Note the
type="location", which indicates that our new field will store a GPS location:
coordinatesand inserting the auto-complete suggestion, and then fill it in as follows, binding it to the gps_location field that we've just defined in our Data Model:
horizontal_accuracyof the captured coordinates before allowing the user to navigate away. For more information please see the GPS Capturing reference.
datetimefield on the
itemmodel, and then we need to capture the timestamp of when the user created the item.
timestampfield to our
itemmodel on the fly from our Views workspace by using the Data Model Panel on the right of the screen. Open the Data Model Panel by clicking on it (click it again to close it), then right click on 'Item' and select 'Add data model field', then select the type as 'DateTime' and enter the label as 'Created At'.
itemmodel, that should look like this.
add_new.jsfile to capture the current date and time when the
itemis created in the
init()function. Like this.