Question
Infosys
US
Last activity: 16 Oct 2018 12:03 EDT
Highlighting text Input control border with RED when ERROR
Hello All ,
I have a requirement to implement highlighting the text input border in RED if the validate rule sends an error message.
We are working on v7.2.2 and there is no option to set the Error border to RED in the Skin/Mixins .
Appreciate any help on this!
Regards,
Nish
***Updated by moderator: Lochan to update Categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Infosys
US
Thank You for all your help !
I was able to achieve this by including the CSS File in Scripts & Styles tab in Harness.
Content of CSS :
input.leftJustifyStyle.ErrorShade{
border-color: red;
}
Regards,
Nish
Pegasystems Inc.
IN
Can you share the screenshot stating the steps you are following?
Similar kind of issue was reported earlier and as per this Support Article, this should have been fixed in V 7.2.2
Infosys
US
Requirement : To highlight the textbox in red when the validation fails
Steps followed :
calling validate rule for validation on change and on tabkey of the textinput that needs to be validated.
validate rule displays errors under the text input control when error occurs.
using a 'when' rule to check if this current page ( associated with the pyDisplayHarness ) contain messages , if yes , using the set style action to set the border color to red ( tried with both inline and custom css style class )
This is not working. Please help.
Instead of fixing the error border issue of 7.1.8 , In 7.2.2 the error-border style format has been removed from the mixin , hence we cannot configure in the skin anymore.
I am looking for any other alternative that you can suggest .
Thanks ,
Nish
Pegasystems Inc.
IN
Hello Nish,
You can try below jquery code snippet as local work around to get the border color for highlighted textField if the validation fails.
<script>
$( ".iconErrorDiv" ).prev().css( "border-color", "red");
</script>
I am able to replicate it at my end, I can suggest you to raise an SR so that anyone from Support can pick it up and will update you.
Thanks & Regards,
Durga
Infosys
US
Hello Durga ,
Please share the screenshots on how to plugin the jquery for a text-input field.
I am unable to incorporate it.
Thanks for the help!
Regards,
Nish
Pegasystems Inc.
IN
Hello Nish,
In Pega7 - Jquery is included by default (version 1.11) and Jquery UI (version 1.10.3) - it is not recommended to include a different version of Jquery to avoid compatibility issues.
Another option is to add a reference of the JS file into the HTML fragment called "UserWorkform"
Save this fragment into your application rule set.
Regards,
Rincy
Accepted Solution
Infosys
US
Thank You for all your help !
I was able to achieve this by including the CSS File in Scripts & Styles tab in Harness.
Content of CSS :
input.leftJustifyStyle.ErrorShade{
border-color: red;
}
Regards,
Nish
-
Mark Stewart
Pegasystems Inc.
IN
Thank you for sharing this, it works!