Image Display Element
The Image element is used to display an image on your form or page. The image source can be a URL or a Base64 encoded string.
In BetterForms, this element is primarily for displaying static or dynamic images. For image uploading, BetterForms typically uses dedicated uploader components like Dropzone or Uppy, which may have their own preview capabilities.
Common Configuration Properties
type
String
Must be set to "image"
.
label
String
An optional label for the image, which might be displayed as a caption or title.
model
String
The key in your BetterForms data model that holds the image URL or Base64 data string.
alt
String
Alternative text for the image, important for accessibility. Defaults to "Image".
width
String
/ Number
Sets the display width of the image (e.g., "100px", "50%", or 100
).
height
String
/ Number
Sets the display height of the image (e.g., "100px", 100
). Can also be "auto"
.
styleClasses
String
/ Array
CSS class(es) to apply to the image wrapper or the image itself for custom styling.
Example Schema Snippet (Image from URL)
Example Schema Snippet (Image from Base64 Data)
BetterForms Specific Notes
This element is for displaying images. For image upload functionality, refer to BetterForms' uploader components (e.g., Dropzone, Uppy) which are documented separately under "Uploading Files".
The
model
property should provide a valid image source (URL or Base64 data URI).Dynamic image display can be achieved by updating the
model
field through actions or hook scripts.
Full Property Reference
Last updated
Was this helpful?