Color button

0
I want that colour of the save  button turn green when i filled all the data and it turns red when the data is empty. How to do this can anyone suggest 
asked
1 answers
1

Hi Guarav,

 

There are 2 ways to create this

 

The First way would be to:

Make 1 green Button and 1 red Button.

In the visibilty settings check by expression if the Fields are empty

$currentObject/field1 != Empty and $currentObject/field2 != Empty

And so on ..

If all fields are filled out then the green Button will be visible.

 

The other way would be to:

Make 1 button.

Make a css class for color green and for color red.

In the Button Properties go to Apperance and set a dynamic class.

In this class make again the expression.

If $currentObject/field1 != Empty and $currentObject/field2 != Empty then 'green' else 'red'

 

Hope this Helps,

answered