[CLOSED] V2.0 Validation Form Help

  1. #1

    [CLOSED] V2.0 Validation Form Help

    Hi, i need any help for validation the form and enabled button, this is the sample page:

    1)If tipy any word in the first field, the button save now enable, if the field is empty the button is disable and
    <ValidityChange Handler="App.ButtonSave.setDisabled(!valid);" />
    work ok

    2) Type any character in firts field and the button is enable,
    If type "validate" in the second field and blur, the error appear ok, but the form not validate the state of the button, is't enable and not disable..

    I can not disable the button, any solution is accepted



    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ARWebRevolution.WebForm1" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Ext.NET v2 Example</title>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server">
             <ext:Viewport ID="Viewport1" runat="server" Layout="border">
                 <ext:FormPanel ID="FormPanelNazione" runat="server" ButtonAlign="Right" Height="185"
                    BodyPadding="10" Padding="3"  Region="Center" Title="Nazioni..." Layout="AutoLayout">    
                     <ext:TextField ID="txtForCod" runat="server" Width="180" AllowBlank="false"
                                    BlankText="*Obbligatorio" MaxLength="8" MaxLengthText="*Lunghezza massima 8 caratteri."
                                    FieldLabel="Codice" >
                                        <ext:ToolTip ID="ToolTipForCod" runat="server" Title="Codice" Html="Codice del fornitore" />
                                <ext:TextField ID="txtRagSoc" runat="server" AnchorHorizontal="100%" 
                                    MaxLength="16" MaxLengthText="*Lunghezza massima 16 caratteri."
                                    FieldLabel="Ragione sociale" >
                                        <Blur CausesValidation="true" Handler="test()" />
                                        <ext:ToolTip ID="ToolTip1" runat="server" Title="Codice" Html="Ragione sociale" />
                                <ext:Toolbar runat="server" ID="ToolBarFornitore">
                                        <ext:Button ID="ButtonSave" runat="server" Text="Salva"  Scale="Medium"
                                             Icon="Disk" ToolTip="Salva le modifiche apportate"
                                            ToolTipType="Title" Disabled="true">
                                <ValidityChange Handler="App.ButtonSave.setDisabled(!valid);" />
        <script type="text/javascript" >
            //Controllo Codice Fiscale
                function test () {
                    var cf = App.txtRagSoc.getValue();
                     if (cf == 'validate') {
                        return false;
                    return true;
    Last edited by Daniil; Mar 14, 2012 at 3:08 PM. Reason: Please use [CODE] tags for all code, [CLOSED]
  2. #2

    The markInvalid method doesn't cause a field to be validated.

    Please use Validator.

    <ext:TextField ...>
        <Validator Fn="myValidator" />    
    See also
  3. #3
    HI, Daniil very very thanks..it's work ok


Similar Threads

  1. [CLOSED] When using Form Validation, I get the error below:
    By Fahd in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 23, 2012, 3:51 PM
  2. Login form - validation form
    By LordMX in forum 1.x Help
    Replies: 0
    Last Post: Aug 14, 2011, 11:44 AM
  3. [CLOSED] RowEditor & Form Validation
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 22, 2011, 9:45 AM
  4. [CLOSED] validation form all
    By rnfigueira in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 22, 2011, 8:05 PM
  5. [CLOSED] Form validation on Page_Load
    By CSG in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 08, 2009, 10:09 PM

Posting Permissions