Jump to content
  • 0

How to change the color of specific label


SunakoChan

Question

9 answers to this question

Recommended Posts

  • 0

Hi

I'm trying to change the color of the labels on mandatory fields in the edit/detail views.

I created a custom.less css file with the following

.redlabel {
    color: black;
    background-color : yellow;    
}
label {
  color: red;
}

When I add the css class to the field in the record.php the background color and text of the field https://francelottoresult.co.za/ changes but not the label, is this affected somewhere else?

record.php

array (
        'css_class' => 'redlabel',  
                'name' => 'gig_date_from_c',
                'label' => 'LBL_GIG_DATE_FROM',
              ),

Edited by MickyMartian232
Something mising
Link to comment
Share on other sites

  • 0

 

How to change font color to a specific label of a expression?Based on a conditional.
 

Hello

 

I need to change the font color to a specific label of a expression based on a conditional.

I have a straight table, because I need different sizes of dimensions https://greecepowerballresults.co.za/ and expressions and the pivot table does not allowed it.

2016-10-19_11-15-10.jpg

 

 

Please advise.

Thanks!

Edited by MickyMartian232
Something mising
Link to comment
Share on other sites

  • 0

Hello - Just wanted to share another way to dynamically change the color of the calculated value/field when a condition is met using CSS.

You can insert this in the Header:

<style>
span.cbFormCalculatedField:has(+ input[name="cbParamVirtual1"][value="No"])  {
  color: #2543be;
}

span.cbFormCalculatedField:has(+ input[name="cbParamVirtual1"][value="Yes"])  {
  color: #29be25;
}

</style>

If you have more conditions or other fields, you can use this:

<style>
span.cbFormCalculatedField:has(+ input[name="cbParamVirtual1"][value="No"])  {
  color: #2543be;
}

span.cbFormCalculatedField:has(+ input[name="cbParamVirtual1"][value="Yes"])  {
  color: #29be25;
}

span.cbFormCalculatedField:has(+ input[name="InsertRecordFIELDNAME"][value="Inactive"])  {
  color: #2543be;
}

span.cbFormCalculatedField:has(+ input[name="InsertRecordFIELDNAME"][value="Active"])  {
  color: #29be25;
}
</style>

Hope it helps!

Link to comment
Share on other sites

  • 0

Hi!

If a user submission causes an error, it is important that they see exactly where the problem is. In addition to displaying an error marker, you can also change the label color of the problem field. This creates a stronger visual prompt. Click Here for that Caspio HowTo article.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...