Add Color to the label in a textField

Hello,

I would like to add color (red) to the label of a textField() in my interface. I know I can use a!richTextDisplayField() and then use the a!richTextItem() to change the colors of the value.

Below code displays Red color value; But I need the label to be in Red color:

a!richTextDisplayField(
label: "Red Text",
labelPosition: "ADJACENT",
value: a!richTextItem(
text: "Red Value",
style: "PLAIN",
size: "STANDARD",
color: "NEGATIVE"
)
)

How can I change the color of the Label here? Thanks in advance for any help in acheiving this.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    We have no control over color or formatting of field labels.  The most you can hope to accomplish is to use rich text as a sort of work-around.  Can you clarify what your actual requirement is?

  • Thanks for your response and clarifying that there is no control available on the field labels.

    My requirement is to display the label in Red when a condition is met, else it should display in black (default). I need to apply this condition on multiple fields in our interface.

  • 0
    Certified Lead Developer
    in reply to sunilc407

    I defer to the side-by-side workaround Josh gave you below, as the thing that would potentially come closest to the design you're after.  As a side note and word of caution, I believe this is a case where "requirements" need to be separated from "design".  Strictly, "requirements" are functional in nature and may suggest but generally should not dictate design - Appian has out-of-box capabilities to functionally handle the use case you describe, it will just require a different design. 

    I know customers seldom understand this concept without a little bit of coaching, but I've found they need to be made pretty clear about this up-front or else they'll start giving more and more "requirements" that the base product can't handle without fundamental (and very unlikely) modifications.

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    As a side note and word of caution, I believe this is a case where "requirements" need to be separated from "design".  Strictly, "requirements" are functional in nature and may suggest but generally should not dictate design - Appian has out-of-box capabilities to functionally handle the use case you describe, it will just require a different design. 

    I know customers seldom understand this concept without a little bit of coaching, but I've found they need to be made pretty clear about this up-front or else they'll start giving more and more "requirements" that the base product can't handle without fundamental (and very unlikely) modifications.

    Brilliant !

  • Yeah this is a great point and should probably have its own thread. Pretty much any time someone makes a post "I have a requirement..." it may be an indication that you should think broadly beyond what the customer dictates and focus more on what problem the customer is trying to solve.

    It's also really important because it demonstrates how anyone who is an Appian Developer can provide a lot of value beyond just building an app. For instance, explaining that you could either spend an extra day on making a form look pixel perfect or meeting more use cases, I think most customers would prefer more use cases.

    (Also most of this is not specific to this post - I think you asked a valid question, but just something general to keep in mind Slight smile)

Reply
  • Yeah this is a great point and should probably have its own thread. Pretty much any time someone makes a post "I have a requirement..." it may be an indication that you should think broadly beyond what the customer dictates and focus more on what problem the customer is trying to solve.

    It's also really important because it demonstrates how anyone who is an Appian Developer can provide a lot of value beyond just building an app. For instance, explaining that you could either spend an extra day on making a form look pixel perfect or meeting more use cases, I think most customers would prefer more use cases.

    (Also most of this is not specific to this post - I think you asked a valid question, but just something general to keep in mind Slight smile)

Children
No Data