getValue/setValue on generated select elements

13 views
Skip to first unread message

Artie Gold

unread,
Apr 24, 2013, 6:52:42 PM4/24/13
to inp...@googlegroups.com
I've run into a problem:

Because I need to set a value in the information to be posted in a form post-click (I have multiple buttons doing slightly different flavors of posts) I have Javascript code that looks like this:

                           ...
                           inputExDefinition.parentEl = 'container1'
                           var theButtons = [{
                                type: 'submit',
                                value: 'Save',
                                onClick: function (e) {
                                    var values = f.getValue();
                                    values.someFlag = "false";
                                    f.setValue(values);
                                }
                            },
                            {
                                type...
                            ...

As part of my (generated) form, I have a "select" field with number values.
Unfortunately, the value in the select field doesn't make the round trip. At some point, the 'value' becomes a quoted string, and a "===" in setValue it fails to be validated, and becomes 0.

Ideas?

Thanks,
--ag
Reply all
Reply to author
Forward
0 new messages