Support

Account

Home Forums Feature Requests Images as input values for Checkbox and Radio fields

Helping

Images as input values for Checkbox and Radio fields

  • It would be great if we could assign images or even custom fonts (i.e. FontAwesome) to be displayed as values for checkbox and radio fields. A typical scenario where this would be useful is for giving your editors the option to select the layout of a page. Instead of saying for example “sidebar on the left”, “sidebar on the right”, “no sidebar” you could indicate it with some graphics.

  • This can be done by setting the choices to images, for example

    
    1 : <img src="/wp-content/uploads/2017/05/image1.jpg" />
    2 : <img src="/wp-content/uploads/2017/05/image2.jpg" />
    

    You can also use other html, for example <i class="fa fa-address-book"></i>

    You can even use an acf/load_field filter if you want to set the images dynamically.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Images as input values for Checkbox and Radio fields’ is closed to new replies.