TxtErrors: Single Location

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
7/29/2013 11:00:14 AM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

TxtErrors: Single Location

Hey Joe,

I don't know how difficult this would be for you, but I was thinking we could simplify the "txterror" UI code a lot by having an option to put all of the errors in a single HTML element, and have the code just change the text and css class based on what the error is.

Ideally, we would be able to position the error holder in the layout.master. There are a ton of different possible errors throughout mojoPortal, and if we could make them all show up in one format and in one location, the necessary CSS to make them all look good would be greatly reduced.

Also, we could make the errors position themselves in the corner of the screen or in a bar at the top, and that way when there is an error the user, after having used the site for a little while, will know where to look to see if they did something wrong.

If it's going to be difficult to do on your end, I'll consider ways to do it with JS on the client end. I'm pretty sure I could just run a check for any .txterror's that are visible on page load, and then grab the text from them and put it in my own div. I might do it for aesthetic purposes, but it won't reduce the CSS I have any this way because I usually still need to make the site work without JS enabled.

Thanks,
-Isaac

7/29/2013 11:47:20 AM
Gravatar
Total Posts 18439

Re: TxtErrors: Single Location

Hi Isaac,

txterror is only a css class, it gets used in many contexts. for all the asp.net validation controls for example we assign that class via the theme.skin file:

<asp:ValidationSummary runat="server" ForeColor="" CssClass="txterror" />
<asp:RangeValidator runat="server" ForeColor="" CssClass="txterror" />
<asp:RequiredFieldValidator runat="server" ForeColor="" CssClass="txterror" />
<asp:RegularExpressionValidator runat="server" ForeColor="" CssClass="txterror" />
<asp:CompareValidator runat="server" ForeColor="" CssClass="txterror" />
<asp:CustomValidator runat="server" ForeColor="" CssClass="txterror" /> 

<asp:ValidationSummary runat="server" SkinID="Registration" ForeColor="" CssClass="txterror" />
<asp:RangeValidator runat="server" SkinID="Registration" ForeColor="" CssClass="txterror" />
<asp:RequiredFieldValidator runat="server" SkinID="Registration" ForeColor="" CssClass="txterror" />
<asp:RegularExpressionValidator runat="server" SkinID="Registration" ForeColor="" CssClass="txterror" />
<asp:CompareValidator runat="server" SkinID="Registration" ForeColor="" CssClass="txterror" />
<asp:CustomValidator runat="server" SkinID="Registration" ForeColor="" CssClass="txterror" /> 

I think you would have to do your own js solution because we have limited control over how those validator controls render.

Best,

Joe

 

You must sign in to post in the forums. This thread is closed to new posts.