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
BedrockMission!

Learn More

View all

Sign in to view all badges

Display an Icon on a form button

Avatar

Avatar
Validate 1
Level 1
William_van_Deventer
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
William_van_Deventer
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
William_van_Deventer
Level 1

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
Boost 3
Level 2
MHWinter
Level 2

Likes

4 likes

Total Posts

12 posts

Correct Reply

2 solutions
Top badges earned
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Boost 3
Level 2
MHWinter
Level 2

Likes

4 likes

Total Posts

12 posts

Correct Reply

2 solutions
Top badges earned
Boost 3
Boost 1
Affirm 1
View profile
MHWinter
Level 2

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
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

278 likes

Total Posts

1,101 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

278 likes

Total Posts

1,101 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

22-12-2020

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

Avatar

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

278 likes

Total Posts

1,101 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 1
Level 10
Mayank_Gandhi
Level 10

Likes

278 likes

Total Posts

1,101 posts

Correct Reply

181 solutions
Top badges earned
Validate 1
Contributor 2
Ignite 5
Ignite 3
Ignite 10
View profile
Mayank_Gandhi
Level 10

17-12-2020

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