async function getPicture(fieldName) {
  try {
    const form = $(`#cptbtn${fieldName}`).closest("form");
    const onsubmit = form.attr("onsubmit");
    form.attr("onsubmit", "javascript:void(0)");
    const fileURI = await parent.saltcorn.mobileApp.common.takePhoto("uri");
    form.attr("onsubmit", onsubmit);
    const inputId = `input${fieldName}`;
    form.find(`#${inputId}`).remove();
    form.append(
      `<input class="d-none" id="${inputId}" name="${fieldName}" value="${fileURI}" mobile-camera-input="true" />`
    );
    const tokens = fileURI.split("/");
    $(`#cpt-file-name-${fieldName}`).text(tokens[tokens.length - 1]);
  } catch (error) {
    parent.saltcorn.mobileApp.common.errorAlert(error);
  }
}
is called when an input with capture=camera is used
It takes a picture with the camera plugin, saves the file, and adds the filename as a hidden input.
@param {*} fieldName