User Guide and Reference

Mobile Camera Support

Hide Navigation Pane

Mobile Camera Support

Previous topic Next topic No directory for this topic  

Mobile Camera Support

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for the print function  

Mobile devices came with in-built cameras, and so users want to be able to integrate this picture-taking capability into forms. Users tap on a form's "Take Picture" button widget and generate an image attachment. This gets uploaded when the form is submitted.

 

Though the attachment generated by the button is like other attachments, the Button [Take Picture] widget is unique in that:

 

It only works in the TransactField App

It is not supported on the desktop or in a mobile device's web browsers

 

The Standard "Take Picture" Button

Very simple form with a camera button

Very simple form with a camera button

 

The "Button [Take Picture]" widget works only in the Mobile App. Tapping on it takes mobile device users to the in-built camera app. The user gets to take the picture and choose either to retake or use the photo. It is not saved to the device's camera roll. For the sake of appearance, we have set "Take Picture -> Edit Properties -> Styling -> Style Sets -> Button Type -> Push button".

 

The form also needs a TM Attachment Rule widget to activate the Attach tab in the Mobile App; we have named this element "Picture" in the structure. Without it, no attachment file will be uploaded to Transaction Manager.

 

The resulting form behaves as follows in the Mobile App (on a smartphone):

 

The form in the Mobile App, and the effect of the "Take Picture" buitton

The form in the Mobile App, and the effect of the "Take Picture" buitton

 

For simple forms like this example, and the user has taken only one photo, the user can go straight to the "Submit" tab and submit.

 

If the users have opted to "Use Photo" more than once, they have to go to the "Attach" tab and choose which image gets attached.

 

Suppressing the Attach and Submit Tabs

There are use cases where you will want to have attachments controlled on the form in the TransactField App, rather than in the app's tabs.

 

You can suppress either tab (or both) in Composer's Structure Tree: "<Form> -> Edit Properties -> Policies tab -> HTML Generation -> Mobile App Customization panel".

 

SuppressMobileTabs

 

Here is an example of the Attach tab being hidden in the TransactField Mobile app:

 

AttachTabSuppressed

 

Restricting Attachment File Types in the App

You now can control the file formats that the TransactField App can accept for an attachment or attachment. Place a TM Attchament Rule widget on the form and fill out the dialog:

 

AttachmentMimeTypes

Saving an attachment of the wrong type in the App results in a popup:

MimeTypeRestrictionTField