Button CSS property onclick change

0
Hai, How to change the CSS property of the button after click and also need to change change the button caption?
asked
2 answers
0

Although Geoffrey has a good point and a very maintainable solution, there is a way do it with one button:

- In the button’s General->Caption use a parameter. See this example:

- In the button’s property ‘Dynamic classes’ add something like

if ($MyEntity/myattribute = Enum_MyEnum.Valuethis) 
then 'brand-success'
else 'brand-warning'

This will pick up the brand’s default colors. You can also create your own classes and add them to your scss-files.

answered
0

Hey there,

what i suggest is the following to make it simple for you:

  • have 2 buttons, one for each state
  • use conditional visibility to activate on or the other

 

This way you have an easy and quick solution to your problem where you can have different colors (can be standard, or you can make custom classes) and you will have different captions.

answered