[CLOSED] FormPanel Submit Values with Disabled and Selectable

  1. #1

    [CLOSED] FormPanel Submit Values with Disabled and Selectable

    Hi, I need to get the value from TextField, It has the property Selectable = "false", but, when I send the values, the value for this control is not sending, How Can I Do to send this value in the same list the data (getValues()) of FormPanel?, because if I have many textfields is very tired one by one.

            <ext:FormPanel
                ID="FormPanel1"
                runat="server"
                ButtonAlign="Right"
                Height="185"
                Padding="5"
                Title="Title"
                Width="300">
                <Items>
                    <ext:TextField
                        ID="TextField1"
                        runat="server"
                        AnchorHorizontal="100%"
                        FieldLabel="Label">
                        <Listeners>
                            <Change Handler="App.TextField2.setValue(App.TextField1.getValue());" />
                        </Listeners>
                    </ext:TextField>
                    <ext:TextField
                        ID="TextField2"
                        runat="server"
                        AnchorHorizontal="100%"
                        FieldLabel="Label"
                        Selectable="false">
                    </ext:TextField>
                </Items>
                <Buttons>
                    <ext:Button ID="Button1" runat="server" Icon="Disk" Text="Submit">
                    <DirectEvents>
                        <Click OnEvent="Button1_Click">
                            <EventMask ShowMask="true" Msg="Registrando informaci?n..." />
                            <ExtraParams>
                                <ext:Parameter Name="registro" Value="Ext.encode(this.up('form').getForm().getValues(false, false, false, true))" Mode="Raw" />
                            </ExtraParams>
                        </Click>
                    </DirectEvents>
                    </ext:Button>
                </Buttons>
            </ext:FormPanel>
            protected void Button1_Click(object sender, DirectEventArgs e)
            {
                string strRegistro = e.ExtraParams["registro"];
                Dictionary<string, string> dRegistro = JSON.Deserialize<Dictionary<string, string>>(strRegistro);
            }
    Attached Thumbnails SubmitFormPanelError.png  
    Last edited by Daniil; Aug 12, 2014 at 4:56 PM. Reason: [CLOSED]
  2. #2
    Hi @osef,

    Yes, the problem is the fact that Selectable="false" disables a field and .getValues() doesn't deal with disabled fields.

    Instead of Selectable="false" I can suggest to try this (a CustomConfig option, not an existing property):
    InputCls="x-unselectable"
    Last edited by Daniil; May 26, 2016 at 7:59 PM.
  3. #3
    Hi Daniil Can you to give me a complete example please?

    Regards
  4. #4
    Here you are.
    <ext:TextField runat="server">
        <CustomConfig>
            <ext:ConfigItem Name="inputCls" Value="x-unselectable" Mode="Raw" />
        </CustomConfig>
    </ext:TextField>

Similar Threads

  1. Replies: 3
    Last Post: Mar 27, 2014, 5:30 PM
  2. How to Submit FormPanel Data
    By abhijit in forum 1.x Help
    Replies: 3
    Last Post: Feb 24, 2012, 8:18 AM
  3. [CLOSED] Partial View & FormPanel Submit
    By peter.campbell in forum 1.x Premium Help
    Replies: 2
    Last Post: Dec 14, 2011, 1:01 PM
  4. Replies: 3
    Last Post: Mar 25, 2011, 10:55 AM
  5. [CLOSED] Submit FormPanel values via AjaxEvent
    By danielg in forum 1.x Premium Help
    Replies: 4
    Last Post: Mar 12, 2009, 9:40 AM

Tags for this Thread

Posting Permissions