Claims login button event, before the callback

Posted by Community Admin on 04-Aug-2018 15:31

Claims login button event, before the callback

All Replies

Posted by Community Admin on 07-May-2013 00:00

What's the best way to be able to modify the username in the claims login widget BEFORE the username is sent?

We upgraded to claims and the problem is before they used to log in with "steve" and the forms backend would append the "@email.com" to validate...now I do it in javascript on blur of the inputs.

However some people use the browser default save password feature so the "blur" never triggers, and calling click on the button itself doesn't seem to maybe happen early enough because the authentication callback is sending the PREappended username.

Steve

Posted by Community Admin on 10-May-2013 00:00

Hi Steve,

You can try subscribing for the form onsubmit event, which is fired before the form is sent to the server. From there you can manipulate the username.

Here is the markup I used:

<head runat="server">
    <title></title>
    <script>
        function onFormSubmit()
            alert('Hi');
        
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="onFormSubmit()">
    <div>
        <asp:Button runat="server" Text="Submit" ID="buttonSubmit" />
    </div>
    </form>
</body>
</html>
Greetings,
Martin Gebov
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 10-May-2013 00:00

Actually also seems to work if you map the template and change OnClientClick="return false;" to OnClientClick="fixInput(); return false;"

:)

Thanks!

This thread is closed