More in this section

Forums / General Discussions / Trimming spaces in login control

Trimming spaces in login control

5 posts, 0 answered
  1. John
    John avatar
    97 posts
    Registered:
    11 Jan 2011
    13 Feb 2012
    Link to this post

    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

  2. Grace Hallwachs
    Grace Hallwachs avatar
    144 posts
    Registered:
    03 Nov 2014
    15 Feb 2012
    Link to this post
    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
  3. John
    John avatar
    97 posts
    Registered:
    11 Jan 2011
    24 Feb 2012
    Link to this post

    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

  4. Grace Hallwachs
    Grace Hallwachs avatar
    144 posts
    Registered:
    03 Nov 2014
    27 Feb 2012
    Link to this post
    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
  5. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    27 Feb 2012
    Link to this post
    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.
5 posts, 0 answered