jiggy,
You have asked very good questions. I'll try to help as much as I can:
First, I noticed in your code, you are deleting "this._formNameField" when in fact, you probably meant to delete "this._formNameId".
Now, because you're using Dwt widgets, you'll have to get access to the HTML elements they are wrapping. This is done differently based on the widget we're trying to inspect.
For DwtInputFields, you'll want to call the getInputElement method like this:
Code:
this._formNameField.getInputElement().name = "foo"
For DwtSelect, its a bit more work since its made up of DIV's (no FORM elements). So you'll want to add a hidden input element and set the name to whatever and the value to be the value of the selected DwtSelect. Here's some code to explain what I mean:
Add this part somewhere in the "createHTML" method:
Code:
this._hiddenInputId = Dwt.getNextId();
html[i++] = "<input type='hidden' id='" + this._hiddenInputId + "' name='foobar'>";
// Save the hidden element of course:
this._hiddenInput = document.getElementById(this._hiddenInputId);
Then, in your save listener, set the value of the DwtSelect into your hidden input element:
Code:
this._hiddenInput.value = this._skillsSelectElement.getValue();
I'm assuming you added the actual FORM element somewhere to wrap the HTML code containing your form elements. If not, you can just add it in the "_createHtml" method and save the form object just like you did the other objects. Remember, you'll also need a hidden IFRAME somewhere to submit the post.
Finally, in the save listener, add in the code from my first post and hopefully, it just works
