Oct 27, 2011, 5:44 AM
form validation problem
Hi,
I created a simple login form with 2 parameters. The problem is , as soon as the form is loaded, required validation errors are shown because no data is entered yet. This is the form
I created a simple login form with 2 parameters. The problem is , as soon as the form is loaded, required validation errors are shown because no data is entered yet. This is the form
<ext:FormPanel ID="e_fp_Login" runat="server" BodyStyle="padding:5px;" AutoScroll="false"
MonitorValid="true" ButtonAlign="Right" Frame="true" Border="false">
<Content>
<ext:FormLayout ID="FormLayout1" runat="server" >
<Anchors >
<ext:Anchor Horizontal="92%" >
<ext:TextField ID="txtUserName" runat="server" FieldLabel="Kullanıcı Adı" AllowBlank="false" TabIndex="1"
AutoFocus="true" MsgTarget="Side" BlankText="Bu alan boş bırakılamaz" />
</ext:Anchor>
<ext:Anchor Horizontal="92%">
<ext:TextField ID="txtPassword" runat="server" InputType="Password" FieldLabel="Şifre" TabIndex="2"
AllowBlank="false" MsgTarget="Side" BlankText="Bu alan boş bırakılamaz" />
</ext:Anchor>
</Anchors>
</ext:FormLayout>
</Content>
<Buttons>
<ext:Button ID="e_btn_Login" runat="server" Text="Giriş" Icon="Accept" FormBind="true"
TabIndex="3">
<DirectEvents>
<Click OnEvent="doLogin" Before="return #{e_fp_Login}.getForm().isValid();">
<EventMask ShowMask="true" Msg="Kontrol Ediliyor..." />
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
<Listeners>
<ClientValidation Handler="#{e_btn_Login}.setDisabled(!valid);" />
</Listeners>
</ext:FormPanel>
thank you in advance