View Full Version : reload just one field from a form?

16 Oct 2009, 4:24 PM
I need to know how to update a single field on a form, after the form has already loaded. Basically, when the value of one of my combo box's changes, I need to change the contents of another combo box.

I am using a popcombo box from Saki's examples.

I have successfully updated the field from static text, but I need it to update from the server side script.

this.findParentByType('form').getForm().findField('formula-feedField').setValue({"value":2,"records":[[0,"Fieldx 0"],[1,"Fieldx 1"],[2,"Fieldx 2"],[3,"Field 3"],[4,"Field 4"]]});

16 Oct 2009, 6:23 PM
add 'select' listener to 1st ComboBox, and load the store of 2nd ComboBox in that listener function.

16 Oct 2009, 7:25 PM
OK, I figured out a way to do it! I can pass a loadField parameter to the load function, which then passes it to the server script. This parameter indicates that I just want to load a field, not the whole form. Then there is another parameter, field, to indicate which field I want to load. The server script interprets these parameters and just returns the data for that field only. The form panel retains all data, and only replaces the information it receives back from the server. :D

p.s. How do I mark a post "Solved?"