Update screen elements based on data

1
We have a 'customer' entity with 'status' attribute. The number of required attributes for the customer change based on status. Required input fields have a label preceding them with blue text instead of the default black. How can I change these text colors 'on the fly' when the user changes the customer's status? Thanks Jan
asked
1 answers
3

How do you validate the required fields and are you using conditional formatting?

You cannot change the labels on the fly, but you could add the the attributes and labels to conditionally formatted rows. This way you could add custom css classes to your table cells. After that you could do whatever you like. :

.yourcssclass .mendixFormView_label {
  color:blue;
}

See my example below. I've setup a birth date as an attribute and a status attribute. I've added the same birth date, 4 times on my dataview. All rows are conditionally formatted:

Model

This is when no status is selected:

Only black

This is when I select 1 of the statuses:

alt text

So with conditional formatting you could achieve different labels for each status.

answered