Media Field Type

Created by Anthony Young, Modified on Tue, 14 Jun, 2022 at 1:17 PM by Anthony Young


This article touches on the Media Field Type that enables app users to capture and upload photos, video and audio media in a Data Entry Form submission.




Add a Media Field


Simply drag 'n drop a Media field or left-click from the list of field types (left) to add it to the design preview (centre), then configure its properties (right).



Initial properties worth configuring:

  • Title Text
    (The title text shown to the user)
  • Media Type
    (Type of media to upload, Image[default]/Video/Audio)
  • Capture Only
    (Removes the "Choose" from device gallery option, forcing the user to capture)
  • Copy to Device Gallery
    (Copies captured files into the device's gallery)


Video capture is generally limited to 30 seconds. This is to save on upload data as videos can easily be 10x larger than an image.



Include GPS Information


Under a Media field's Basic Properties, tick the "Include GPS Information" property.



Now when capturing images, the user's GPS location and heading information will be stored as part of the field's value.


This information can also be used to dynamically drive additional properties and other field values using the following formula:

  • LAT({{mediaField}}) - Returns latitude
  • LON({{mediaField}}) - Returns longitude
  • HEADING({{mediaField}}) - Returns heading


More information on Creating Formulas and our Formula Cheat Sheet might be of interest.


Apply Watermark Text


Under a Media field's Advanced Options properties, is where a watermark can be configured.



This feature supports...

  • Dynamically generated multi-lined text
  • Custom text colour, size and position
  • Watermark background colour
  • Stroke outlined text


This feature allows you to dynamically generate multi-lined text as a watermark onto images that are captured or chosen via a Media field during Form entry.


The text stamped on the image is driven by a formula of your creation (not just a data field reference), with options to customise the colour of the text and the position it appears in the image.


Example

Formula to generate watermark:

Date: {( IMGDATE({{mediaField}}) )} {( '\n' )} GPS: {( FORMAT-GEO({{mediaField}}, 'DMS') )}


Watermark Text displayed on image:

Date: 2021-04-04T11:30:33+02:00

GPS: 27°42'55"S 29°46'43"E



Watermarking size is directly and inversely related to pixel limit (default: 800), as its limit decreases the watermark size increases. 
A Data Entry Form's pixel limit can be located in the Title Bar properties.



Custom File Name


Under a Media field's Advanced Options properties, is where a custom File Name can be configured.


Static Text: Form Name -

Dynamic Text: {{fileName}}


It takes a standard formula, that can have static and dynamic text by referencing field data names.


Repeatable Data Considerations

If you want to reference a specific repeat within a Table field using the POSITION({{TableFieldName}}) function, you cannot do so directly in the File Name formula. 


You need to add another field (i.e. Hidden/Text field) to the table which calculates the file name, and then reference the field in the File Name formula.


Example


  1. Text Field: File Name
  2. Table Field, allows for repeatable data capture
  3. Numeric Field: Image Number , with dynamic value POSITION({{table}})
  4. Hidden Field, calculates full file name using File Name and Image Number
  5. Media Field with custom file name: {{fileNameHidden}}


If you'd like to install the above examples covering watermarking and custom file naming, the attached .xlsx can be imported into a Data Entry Form to test.


How to: Importing Fields From Excel.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article