Displaying Captured Images using a Form View

Description

It is easy to configure a Form View such that it can be used to select and save, or 'capture', images to a list control.

images/im31.png
An image captured in a form view (right) and saved into a list control (red arrow)

In this example, a form view opens after a user clicks on a given row in the list control. The user can then select an image from his or her file system to display in the form view and, if desired, add to the list control. For a visual explanation watch this video or read the guide below.

  1. In the UX Builder, open the Controls page. In the Data Controls menu click [List] to add a list control to the component.

    images/im.png
  2. In the control's properties list, in the List Properties section, click on the 'List properties' property to open the List Builder.

    images/im2.png
  3. In the List Builder's Data Source pane select 'Static' in the Data Source Type' menu.

    images/im3.png
  4. Click the [...] button next to the Static data property.

    images/im4.png
  5. In the Static Choices dialog click the 'Sample data' button in the lower left corner.

    images/im5.png
  6. Add the 'Name and addresses' data and click OK.

    images/im6.png
  7. In the first row of the data add a fifth field named 'Picture'. Your Static Choices data should look like this, click OK:

    images/im7.png
  8. Open the 'Fields' pane of the List Builder. On the left, highlight the 'Picture' field.

    images/im8.png
  9. In the Client-side section of the 'Picture' field's properties list, on the right, click the [...] button next to the 'Control type' property. Set the control type to be 'Image'

    images/im9.png
  10. In the Image Properties section set the 'Image Data type' to be Base64.

    images/im10.png
  11. Open the 'List Layout' pane. Use the blue > arrow to move all of the data fields from the Available fields list into the Columns in List. Then click OK to close the list builder.

    images/im11.png
  12. On the UX coontrols page open the Other Controls menu. Click on the [Form View] option to add a form view control to the component.

    images/im12.png
  13. Click on Form properties to open the form view builder.

    images/im13.png
  14. Open the Data Source pane. Set the Datasource type to 'List'. Using the dropdown, set the List name property to be list1, or the name of the list defined earlier.

    images/im14.png
  15. Open the Fields pane and highlight the 'Picture' field.

    images/imfix1.png
  16. In the Field Properties section change the Field type from 'Unspecified' to 'Image'.

    images/imfix2.png
  17. In the Image Field Properties for the 'Picture' field check the 'Allow image capture' checkbox.

    images/imfix3.png
  18. Open the Form Layout pane of the Form View Builder and Click the 'Add item' button.

    images/im15.png
  19. In 'Category' menu select Data Controls, in the Control menu select [Label], and in the field list select highlight the Firstname, Lastname, City, and State fields. Click OK to add theses to the control.

    images/im16.png
  20. Click the 'Add item' button again. Select 'Data Controls' again in the Category menu. This time in the Control menu select [Image-Databound], then highlight the 'Picture' field and click OK.

    images/im17.png
  21. Click the 'Add item' button in the Form Layout pane one final time.

    images/im19.png
  22. In the Category menu select 'Pre-defined Controls'. In the Control menu select [Save Form Edits/Cancel Edits Button] and click OK.

    images/im18.png
  23. Highlight the [Image-DataBound: Picture] item that you added. In the Image Properties section of its properties list click on the [...] button next to the 'Missing image HTML' property.

    images/im20.png
  24. Add the following message. This will be displayed when there is no defined image.

    Click here to capture an image.
    images/im21.png
  25. In the Camera/Image Capture section check the Allow image capture property. Set the Image capture method to be 'TapOnImage'. Click OK to close the Form View Builder.

    images/im22.png
  26. On the UX Controls page again open the Containers menu. Click on the [Container] option. On the Insert Container dialog's 'Container Type' menu, select 'Editor Set' and hit the 'Insert After' button.

    images/im23.png
  27. Open the Defined Controls menu. Click on the Editor-Textbox option to add an editor inside the editor set container.

    images/im24.png
  28. Highlight the Form View control. Open the Form View Builder again and go to the Fields pane.

    images/im25.png
  29. In the 'Editing' section click the [...] button next to the 'Editor set' property.

    images/im26.png
  30. In the Select Editor dialog highlight the Editor set you defined and then the Editor. Click the 'Assign selection to multiple fields' button, highlight all of the fields and click OK.

    images/im27.png
  31. Close the Form View Builder and run the component in Live Preview. Highlight a row in the list to open th form view. The click on the picture field to edit it. Navigate to the picture you want to insert on selected list row.

    images/im28.png
  32. Click the Save Button to save the image to the list.

    images/im29.png
  33. images/im30.png

See Also