Colors depending value

Hello to all, I made this few times already but I am not know what I am doing wrong this time. I would like to show a color in the row depending of the value. here is the screenshot of the code. any clue??

Should be bg-success not table-success …

Ok, I change it but the result doesn’t change

Hmmm, looks right.


1: Clear your browser cache and try again
2: remove the ‘editarconta.’ . Not sure what that is referring to.

Thanks Brad’
1- I did clear the cache, doesn’t work
2- The "editatconta.servierconnectform2 is the name where I am getting the value to be use as parameter. might be that part is the problem. lets me elaborate:
I have a detail page where I place paragraphs for each value and them I bind the value directly from the server connect that I dedicate for that and is showing the values perfectly. that’s why that name, by the way are two spanish words abbreviations together, that’s why sound wear. then when I try to do the colors them doesn’t work that action. may be the way that I did it is not possible to place colors I don’t know.

Hi Alex, you should be able to do that no problem. I do it all the time. And your code looks good. Maybe Teodor can spot something I am missing.

Also check out this tutorial maybe?

I will check it, may be I miss something, thanks

I see you aren’t using tables. If you add bg-success directly to your row classes does it work. Just want to make sure that background colours actually work for rows. It should.

Yes, it works, actually each row have a color assigned around, the row where the value is located have the borders in all sides green.

So bg attribute does work so that means it is something wrong with your value.

That what I am thinking, the value is correct as is because is showing the correct letters. but might where I am getting the value. I will try few others way from where get it and I will be back and show the results.

1 Like

I wonder if it may have something to do with the 73 errors on the page? Perhaps missing a closing tag or something. What are the code errors?

There a form that is pointing incorrectly, is something that I will erase, the rest is working fine and is doing the work that was created for. is not in production yet.

Is something that I have to fix.

Where are the form inputs?

e.g. <input type="text" class="form-control" id="inp_STATUS" name="inp_STATUS".

You can try to use and dmx.parse in dev tools console to identify what value editatconta.servierconnectform2.input.value returns.

Probably that is the problem. in the page that I am showing the data, I bind the values from a server connect action and is showing the data, I use the same source for use as parameter in order to show the colors. might that is the problem them

This is how to use form input values:

If you want to use values from the backend, then you will need to use the Server Connect component.

Yes, the problem is that the page in use is not for input, is just for show values that are already in the database. and might be that is the problem, the way or the server connect that I am using to get the values that are show.