Issue

When you view a form in the K2 Workspace for iOS app which contains a background image, the image does not display.

Workaround

Follow the steps below to fix the issue:

  1. Open K2 Designer and edit the form.
  2. Add a Data Label control to the form.
  3. Select the Data Label control, uncheck the Visible option and check the Literal option in the section.
  4. Open the expression editor on the Data Label. Click Add on the Select an Expression for the 'Data Label' Control page.
  5. On the Add Expression page provide a name for the expression. Add the following JavaScript to the Expression Details section. Click OK and OK again.

    <script>

    var bodyElement = document.querySelector(".mobile body");

    if (bodyElement !== undefined && bodyElement !== null)

    {

    bodyElement.style.position = "relative";

    }

    </script>


  6. Select the Rules tab and add an unbound rule with two Transfer Data rule actions. Add a Rule Name for the unbound rule.
  7. Click configure on the first Transfer Data action. On the Transfer Data page, check the Data Label in the Mapping Destinations section. Click OK.
  8. Click configure on the second Transfer Data action. On the Transfer Data page, add the expression you created earlier from the Context Browser to the Data Label. Click OK. Click OK again.
  9. On the Rules tab click Add Rule.
  10. On the Rule Designer page select the When the Form raises an event event, then select the Initializing event.
  11. On the Actions tab, select the Execute another rule action and then select the unbound rule you created earlier. Click OK then Finish. Check in the form.
  12. Open the K2 Workspace for iOS app and view the form. The background image now displays.

Considerations

  • If your form has Anonymous Access enabled, there is caching conflict where the Application Pool user used for Anonymous Access differs from user who last checked out the form. This affects the workaround discussed in this Known Issue. To fix this caching conflict follow the steps below:
    1. Open K2 Designer and edit the form.
    2. Uncheck the Anonymous Access option.
    3. Save the form, click Finish, and check in the form.
    4. Check out the form again.
    5. Edit the form and check the Anonymous Access option.
    6. Ensure the above mentioned workaround is configured correctly.
    7. Save the form, click Finish, and check in the form.
    8. Refresh the form in the K2 Workspace for iOS app.
    9. The background image displays on the Anonymous Access enabled form.