Opened 15 years ago
Closed 15 years ago
#2998 closed defect (fixed)
Editor2 does not update the hidden input field, therefore submitting does not push the data to the server
Reported by: | guest | Owned by: | liucougar |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Editor | Version: | 0.4.2 |
Keywords: | Editor2 submit | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
with a simple Editor2 setup, using <textarea name="foo" dojo:type="Editor2"> the contents of the textarea is not updated when the Editor2 widget is changed by the user.
probably an onchane event handler should update the value of the dom node that was used to instantiate the Editor2 widget (when it's an input node).
or do i badly miss something?
Change History (10)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Owner: | changed from anonymous to liucougar |
---|
comment:3 Changed 15 years ago by
some more info: seems like RichText?.js is trying to deal with form submitting using this:
if(this.textarea.form){ dojo.event.connect('before', this.textarea.form, "onsubmit", // FIXME: should we be calling close() here instead? dojo.lang.hitch(this, function(){ this.textarea.value = this.getValue(); }) ); }
but it doesn't seem to get called when ajax-submitting the form using dojo.io.bind and therefore the value of the textarea is empty when posted.
comment:5 Changed 15 years ago by
Component: | General → Dijit |
---|
comment:6 Changed 15 years ago by
fyi, i've implemented full js based nested form support and the new code does not rely on the normal form submission anymore, therefore this issue is not making me headaches anymore.
comment:7 Changed 15 years ago by
Component: | Dijit → Editor |
---|---|
Milestone: | → 0.9 |
I know that Editor doesn't want to serialize it's value to the hidden <input> every time type a character (too expensive) but I thought it connected to the form's onsubmit or something?
comment:8 Changed 15 years ago by
yep, it attaches to form.onsubmit, but form.onsubmit is not called when submitting it with dojo.io.bind.
in my current setup i'm not using html form tags anymore, but rather use my own form repository on the client side, keeping track of the form fields and iterating them to collect the data to be submitted. this way i can flexibly handle everything, including nested forms which is not supported by <form>.
so i think we can close this ticket and wait until dijit is out. then i'll report back if i find some problem.
comment:9 Changed 15 years ago by
I see. OK, we should at least make sure that an editor in a Form widget has it's value correctly serialized (see test_Form.html).
comment:10 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
oh, i forgot to mention that it's version 8582 from svn.