[CLOSED] [1.0] Hidden Fields Not Being Submitted

  1. #1

    [CLOSED] [1.0] Hidden Fields Not Being Submitted

    Hello,

    I have a page containing a FormPanel. Within this FormPanel there is a TabPanel which contains several Panel controls. If I set one of the Panel controls to hidden (server side before page render) then the tab is correctly hidden. However, when the FormPanel is submitted (using formPanel.getForm().submit(...);) the controls (TextField, TextArea etc) on the hidden Panel are not being submitted.

    I think I have tracked this down to them not being in the FormPanel's BasicForm's item collection and I believe this is because the hidden tab is being removed from the TabPanel's item collection. When I look at the ExtJS code that is generated by Ext.NET I can see that the hidden tab has been created as if it was Lazy (I think that's the right term).

    Do you know how I can change this behaviour so that the controls are submitted correctly?

    Thanks,
    Richard
    Last edited by geoffrey.mcgill; Aug 26, 2011 at 9:17 PM. Reason: [CLOSED]
  2. #2
    1. TabPanel doesn't support prehidden tabs. Therefore if you set Hidden=true for the tab then tab will be rendered outside tab (as hidden container) and probably outside your FormPanel
    2. Why do you use 'FormPanel.getForm().submit()' instead Click DirectEvent of the button
    3. Please provide simple test sample are demonstrated how all is configured
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    We use the submit() method because that was what I had seen in your original Coolite MVC example on Google Code. We need to be able to change the URL that the form is submitted to along with success/failure handlers and to specify extra parameters.

    I think the root cause of the problem is that the fields are not within the FormPanel and so they are not being sent properly. I am presuming there is a reason why the tabs cannot be pre-hidden, what is this?

    I am not sure the use of a Click DirectEvent would solve the problem and I don't want to specify the controls as extra parameters as they could change dynamically based on the customers configuration of the form and there are a lot of them.
  4. #4
    I am presuming there is a reason why the tabs cannot be pre-hidden, what is this?
    It is ExtJS TabPanel limitation. I can suggest to call 'hideTabStripItem' method in the AfterRender listener of TabPanel instead Hidden using
    <AfterRender Handler="this.hideTabStripItem(#{Tab3});" />
    Vladimir Shcheglov
    Sr. Developer
  5. #5
    To show tab you can use 'unhideTabStripItem' method
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. [CLOSED] [1.0] form validation - hidden fields
    By betamax in forum 1.x Premium Help
    Replies: 5
    Last Post: Oct 20, 2010, 2:04 PM
  2. Replies: 1
    Last Post: May 24, 2010, 4:06 PM
  3. [CLOSED] Not all form fields are submitted
    By Stefanaccio in forum 1.x Premium Help
    Replies: 8
    Last Post: May 05, 2010, 12:58 PM
  4. Replies: 3
    Last Post: Apr 19, 2010, 5:00 AM
  5. Submitted data too big
    By marcossoft in forum 1.x Help
    Replies: 9
    Last Post: Jul 27, 2009, 7:26 PM

Posting Permissions