• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

formfieldDisable font intensity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • formfieldDisable font intensity

    When using

    SetResponse('formFieldDisable':'CONTACTEMAIL');

    in my RPG, I see the intensity of the 'disabled' field is fairly light. Is there any way to increase the darkness of the label and data when the field is disabled?

    image.png?

    when the field is not disabled, it is significantly darker

    image.png?

    trying to keep disabled and enabled fields the same darknesss.

    ??

  • #2
    If you want to change the CSS style of disabled fields, you can override the CSS rule to not adjust the opacity.

    CSS
    Code:
    .x-field.x-item-disabled {
        opacity: 1 !important;
    }
    Then set the resource to be used via Portal Admin > Settings > Nitro App Builder "Additional Resources"

    For example:
    Screenshot 2025-04-03 at 10.55.54?AM.png

    Comment


    • #3
      My previous response was based on the assumption that you want to change the styling of disabled fields in all NAB applications; however, if you just want to change the style of a disabled fields in a single application so that it doesn’t have any opacity (which is the default style of disabled fields), you could add the following code via Behaviors > Startup > Execute Script:
      Code:
      // Create a new stylesheet
      const sheet = new CSSStyleSheet();
      
      // Add the rule so that disable fields don't have any opacity
      //
      sheet.insertRule('.x-field.x-item-disabled { opacity: 1 !important; }', 0);
      
      // Apply the stylesheet to the document
      //
      document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
      
      success();

      Comment

      Working...
      X