Mar 04, 2015, 5:49 AM
[CLOSED] Textfield trim on clientside
Hi, I have this textfield:
This is the button I use to "post" the information to the server:
<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">
<DirectEvents>
<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');"
Success="#{grdE}.store.reload();top.GApp.wndHdr(#{wndE},2);">
<ExtraParams>
<ext:Parameter Name="values" Value="#{frmE}.getForm().getValues()" Mode="Raw" Encode="true" />
</ExtraParams>
<EventMask ShowMask="true" Msg="Procesando Informacion..." />
</Click>
</DirectEvents>
</ext:Button>
Last edited by geoffrey.mcgill; Mar 06, 2015 at 2:31 AM.
Reason: [CLOSED]