PDA

View Full Version : [CLOSED] clientside setValue('') on TextField with AllowBlank, not invalidating form after delay



michaeld
Aug 15, 2013, 1:42 PM
I have a captcha control that contains a text field with an allowblank = false. After a period of time (expires), javascript client code sets this intput textfield.setValue(''). I expect this update to blank to invalidate the form again. It does not. What else do I need to call to invoke clientvalidation of the parent form?

Daniil
Aug 15, 2013, 3:15 PM
Hi @michaeld,

I cannot reproduce it this way. Please provide your test case.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:FormPanel runat="server">
<Items>
<ext:TextField
ID="TextField1"
runat="server"
Text="Initial text"
AllowBlank="false" />
</Items>
<Listeners>
<ValidityChange Handler="console.log(valid);" />
</Listeners>
</ext:FormPanel>

<ext:Button runat="server" Text="setValue('')" Handler="App.TextField1.setValue('');" />
</form>
</body>
</html>

michaeld
Aug 28, 2013, 12:32 PM
I will return to this when I have a chance. Sorry. This was a minor issue so until some of our majors are closed, I dont have the time to swing back around, as yet.

Perhaps I can even give up some of the code so other users can use it since I've seen requests for a captcha implementation in other threads. Mine is based on a publicly-available implementation for the image, but I wrapped it with extjs as a usercontrol. It would be even better if it could be reimagined as a proper extnet control. Until then, a day at a time.