Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Display an Icon on a form button

Avatar

Level 1

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.

5 Replies

Avatar

Level 5

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

Employee Advisor

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