Display an Icon on a form button

Avatar

Avatar

William_van_Deventer

Avatar

William_van_Deventer

William_van_Deventer

14-12-2020

What is the recommended way to display an Icon on a button in an Adaptive From instead of the usual text?

I've checked the button component's  widget.jsp and while there is a <span class="iconButton-icon"></span> being rendered, I don't see anything that appears to allow specifying an icon to display. Ideally I'd like to use the built-in icons already provided by aem.

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar

MHWinter

Avatar

MHWinter

MHWinter

15-12-2020

I am not an expert so this may not be the most elegant way of doing it: a simple solution is just to place an image object over the button object. I tried and it works 🙂

Avatar

Avatar

Mayank_Gandhi

Employee

Avatar

Mayank_Gandhi

Employee

Mayank_Gandhi
Employee

22-12-2020

@William_van_Deventer Have you tried the style editor to add inline css?

Avatar

Avatar

Mayank_Gandhi

Employee

Avatar

Mayank_Gandhi

Employee

Mayank_Gandhi
Employee

17-12-2020

@William_van_Deventer  You can use the image component or text component and embed the image using source edit.