We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37286
    • 160 Posts
    This is driving me crazy. I have a pop up window that works perfect the first time, but doesn't work right after that. It's a standard create item window like the doodle walkthrough. I have a text field that contains a value, I need to grab that value from the modal window when it is opened. I have tried multiple methods and all end one of two ways, no value, or it grabs the value the first time the modal window opens, but subsequent times I get the value I had the first time, not an updated value. It's like the value is cahed.

    As can be seen in the below code, I'm currently trying a simple Ext.getCmp expression to get the value. But if the field 'field-this_field-value' changes, the next time I open the modal window, my window field value does not change. How do I force it to run the getValue function again?

    ,fields: [{
                xtype: 'textfield'
                ,name: 'this_field'
                ,value: Ext.getCmp('field-this_field-value').getValue()
                ,anchor: '100%'
            },
    
      • 4172
      • 5,888 Posts
      you are setting the value on initialising the window with a config-option.
      when opening the window a second time you will need a function, which resets this value with fresh content or probably destroy your window onClose.

      other question: what is the purpose of this field and why do you need to get a value from another field.
      isn't the value in your store?

      Tip: If you would like to have less crazyness while creating your CMP you could try doing it by using MIGXdb
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 37286
        • 160 Posts
        I've tried a few listeners, but none of the events appear to be firing. Do you have a suggestion on an event I can use?