PDA

View Full Version : ComboBox value and text



crystal
23 Oct 2007, 11:33 PM
Hello. sorry for my English, please say me how i can reset value and text of ComboBox (converted select).
I have ComboBox and "Reset" button on form. How i can reset value and text of this Combo box.

Jamiroquai
24 Oct 2007, 6:06 AM
Try This!


form.addButton('Reset', function(){
combo.setValue("");
}, form);


Good Luck!

RSidetrack
24 Oct 2007, 7:37 AM
You may also wish to reset it to the initial value, in which case do the following:



form.addButton('Reset', function(){
combo.reset();
}, form);


So if the app loads and the initial value is "test" and they had it changed to "testing", when reset is clicked the value will return to "test".