[CLOSED] Textfield trim on clientside

  1. #1

    [CLOSED] Textfield trim on clientside

    Hi, I have this textfield:

                                <ext:TextField ID="tCurp" runat="server" FieldLabel="CURP" Name="tcurp" AllowBlank="false" MaxLength="18" EnforceMaxLength="true" FieldStyle="text-transform: uppercase;" FieldCls="bygl"/>
    As you can note it has allowblank tag, but I dont want whitespaces, and before I send the form to the server, how can I check(after a trim) if the textfield is empty?

    This is the button I use to "post" the information to the server:
            <ext:Button ID="btnE" runat="server" Text="Guarda" IconCls="iguarda">
                                <Click OnEvent="btnESave" 
                                    Before="return #{frmE}.isValid();"  //Here I need to have the check of the textfield
                                    Failure="Ext.MessageBox.alert('Error', 'Error Guardando Informacion');"
                                        <ext:Parameter Name="values" Value="#{frmE}.getForm().getValues()" Mode="Raw" Encode="true" />
                                    <EventMask ShowMask="true" Msg="Procesando Informacion..." />
    Last edited by geoffrey.mcgill; Mar 06, 2015 at 2:31 AM. Reason: [CLOSED]
  2. #2
    Hi @rguardado,

    Please try a TextField's AllowOnlyWhitespace="false" setting.
  3. #3

    It works

    Thanks, It does what I need.

Similar Threads

  1. Replies: 2
    Last Post: Aug 28, 2013, 11:32 AM
  2. Prevent automatic trim in Grid Cell
    By inaltec in forum 1.x Help
    Replies: 6
    Last Post: Dec 13, 2012, 4:23 PM
  3. Disable zero trim in NumberField ?
    By Mohammad in forum 1.x Help
    Replies: 2
    Last Post: Nov 14, 2011, 11:31 AM
  4. [1.0] Set focus textfield clientside kind of broken
    By plykkegaard in forum 1.x Help
    Replies: 3
    Last Post: Feb 14, 2011, 11:42 AM
  5. How to add Clientside validation?
    By speddi in forum 1.x Help
    Replies: 2
    Last Post: Jun 01, 2010, 1:09 AM

Tags for this Thread

Posting Permissions