Trimming spaces in login control

Posted by Community Admin on 03-Aug-2018 09:44

Trimming spaces in login control

All Replies

Posted by Community Admin on 13-Feb-2012 00:00

Hi

When users copy and paste the password a space is added to the end. Is there a way to trim spaces from the password that users type in the login control?

Thanks

Regards

Posted by Community Admin on 15-Feb-2012 00:00

Hello,

Yes, you can modify the login widget in order to trim spaces I believe. You will need to override the login widget in order to achieve this type of functionality.

I have included a blog post about how to modify a widget. This blog posts explains how to modify the login widget and add additional logic to the widget.

Please let us know if you have any additional questions.

All the best,
Grace Hallwachs
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 24-Feb-2012 00:00

Hi Grace

Many thanks.

How can I disable the ‘Forgot your password’ and ‘Change password’ features under certain conditions in my custom login?

Thanks

Regards

Posted by Community Admin on 27-Feb-2012 00:00

Hi,

I replied to your support ticket also. You can hide the control through CSS by using the "display:none" property. I have included a link to CSS styling and a link to the "!important" cause you can add in the display property.

Please let us know if you have anymore questions.

Kind regards,
Grace Hallwachs
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 27-Feb-2012 00:00

I created a default TextBox skin to trim spaces from all textboxes. Works nicely. And it handles the spaces in the login control. I also created a "no trim" skin that I can apply to textboxes where I want to permit leading or trailing spaces, but that's rarely necessary.

<asp:TextBox runat="server" onblur="this.value = this.value.replace(/(^\s*)|(\s*$)|(^\n*)|(\n*$)/g, '');" CssClass="text input" />

You could probably also do the same thing with a jQuery bind or live function.

I think it's easier than messing with SF templates.

This thread is closed