Function removeDisplayedFormPhotoById

  • JMap.Form.removeDisplayedFormPhotoById

    Deletes a photo on the currently displayed form, for a given photo id.

    Parameters

    • photoId: JId

      the photo to delete

    Returns void

    Throws

    if invalid id passed, or photo not found

    Example

    if (JMap.Form.hasDisplayedForm() && JMap.Form.hasDisplayedFormAPhotoField()) {
    const photos = getDisplayedFormPhotos()
    if (photos.length > 0) {
    JMap.Form.removeDisplayedFormPhotoById(photos[0].id)
    }
    }