You can enhance Radio Buttons and Checkboxes with images. Image options can be customized for an image survey, quiz, poll, purchase form, and many more. This option will replace the radio button or checkbox with images you select.
By default, text labels are shown with images but can be hidden. Choose the image size that works best for your form. Then set the colors and other styling features in the visual form styler.
Add radio or checkbox with images
To add images in a Checkbox or Radio Button field:
- Add a Radio button or Checkbox field to your form.
- Select Images as the Display Format.
- Select a size for the images in the Image Size dropdown.
- Select the Hide option labels box if you don't want the labels to show.
- Select the Use separate values box if you want to store an entry as a value distinct from the selected value. Read more about separate values.
- Each option includes an image and a text label. Fill in a text label. Each option must have a text label, even if you're not showing it in the form.
- Click on the Upload Image button to choose an image. You can upload a new image or select an image that already exists in the Media Library.
- Click the Add Options link to add more options to your field.
Replace selected image
To change a radio button or checkbox image:
- Click Delete to remove the currently selected image.
- Click on the Upload Image button to select a new image.
Image sizes
All image sizes are displayed as a square. The size options are:
- Small: 150px (the default size)
- Medium: 250px
- Large: 320px
- Extra large: 400px
To set a custom size, go to Formidable → Global Settings → Custom CSS and add this CSS:
#frm_field_160_container.frm_image_options { --image-size:100px; }
Replace 160 with the ID of the field to change, or remove #frm_field_160_container to apply to all fields.
Styling image options
Image options use values from your form styling settings. You can change the appearance of image options with the following Style settings:
- Default border: Field Colors → Border
- Border hover/selected color: Field Colors → Active Style → Border
- Checkmark background color: (same as Border hover/selected color)
- Border width: Field Colors → Thickness
- Border radius/corners: Field Settings → Corners
Display image choices
Display selected images in a form confirmation message, email, or View.
Shortcode options
- Show image and label: By default, images will be displayed. Labels will be displayed if labels are displayed in the field. You can override these defaults with the show_image and show_label params.
[x]
Replace x with the ID of the radio/checkbox field.
- Hide image: Hide the image and show only the label:
[x show_image=0]
Replace x with the ID of the radio/checkbox field.
- Hide label: If the label is set to show in the form, it will show by default here. To hide it, use:
[x show_label=0]
Replace x with the ID of the radio/checkbox field.
- Show label: If the label is set to be hidden in the form, it will be hidden by default here. To show it, use:
[x show_label=1]
Replace x with the ID of the radio/checkbox field.
- Add link: Link to the full-sized image.
[x add_link=1]
Replace x with the ID of the radio/checkbox field.
- Open link in new tab: Open the link to the image in a new browser tab. The new_tab=1 parameter must be used in conjunction with the add_link=1 parameter.
[x add_link=1 new_tab=1]
Replace x with the ID of the radio/checkbox field.
- Image size: Set the image display size using either size=thumbnail, size=medium, or size=full. The default size displayed is the thumbnail. In WordPress, the default thumbnail size is a 150x150 image. Specify a different size to show a bigger image.
[x size=full]
Replace x with the ID of the radio/checkbox field.
- Show attachment ID: Display the attachment ID of the selected image.
[x show=id]
Replace x with the ID of the file upload field.
You can display a field that has image options using field shortcodes like [100] or the frm-field-value shortcode.
Default email message
By default, images selected in radio buttons and checkboxes will be shown with the default-message shortcode in HTML emails and the frm-show-entry shortcode.
In plain text emails, the labels will be shown without images.
To hide images in the default-message or frm-show-entry shortcodes, add show_image_options=0.
For example:
[default-message show_image_options=0]
Limitations
- The option to display images is not included in Lookup and Dynamic fields.
- The bulk editor is not available for use with image options.
- Image options aren't designed to work with Add Other options.