Help with a custom dialog 'edit_text' question please...
Hi there,
I have a custom dialog with an edit_text field on it.
Is it possible to load the field with some default text?
Thanks in advance.
Hi there,
I have a custom dialog with an edit_text field on it.
Is it possible to load the field with some default text?
Thanks in advance.
Yes, using the initialize method of the dialog object. Let's say it's called "txt1". You can use this in your object definition:
initialize: function (dialog) {
// Create a static text containing the current date.
var todayDate = util.printd("mmmm dd, yyyy", new Date());
dialog.load({ "txt1": todayDate });
},
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.