Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
I found that it doesn't work in IE 9. In Google chrome it works nice.
Comment | File | Size | Author |
---|---|---|---|
#5 | clientside_validation_example.zip | 8.04 KB | attiks |
Comments
Comment #1
attiks CreditAttribution: attiks commentedCan you try the demos (http://atix.be/cv6a) and let me know if these work or not?
Comment #2
igorik CreditAttribution: igorik commentedHi, demo works correctly.
Comment #3
attiks CreditAttribution: attiks commented@igorik, can you try the demo's on your drupal install as well?
Comment #4
igorik CreditAttribution: igorik commentedI would like to, what I have to do for it?
Comment #5
attiks CreditAttribution: attiks commentedu can use
git clone http://git.drupal.org/sandbox/jelles/1193994.git clientside_validation_example
or use the zip in attachComment #6
igorik CreditAttribution: igorik commentedok, I have it installed and enabled, but there is no info in the readme, what next, what and where to do.
Comment #7
attiks CreditAttribution: attiks commentedyou can find a sample form at /examplesform, i think it's in the navigation menu, but you can access it directly at www.example.be/examplesform
Comment #8
igorik CreditAttribution: igorik commentedThanks
http://www.somvprahe.sk/examplesform
works nice.
Weird, why then node/add forms in IE9, e.g. http://www.somvprahe.sk/node/add/komunitna-akcia
doesn't work (validate) correctly.
You can try it live if you want, just send me an email on igorik@somvprahe.sk and I will send you login details for testing account.
Comment #9
attiks CreditAttribution: attiks commenteddo you get any js errors in ie?
Comment #10
attiks CreditAttribution: attiks commentedComment #11
igorik CreditAttribution: igorik commentedHi
I have no js errors.
I did some research and I found that this problem is because this module interferre with wysiwyg module.
After submitting some node form with empty required fields, the client validation message is shown, but
wysiwyg js from body textarea is disabled/hidden(all wysiwyg buttons disappear) and the content fo this textarea is shown in html source.
This bug is visible in chrome with wysiwyg prifiles with tinymce, markitup, and ckeditor.
and in IE 9 with markitup, and tinymce.
With combination IE9 + wysiwyg + CKeditor (as wysiwyg profile) client side validation doesn't work at all (this was oriogin of this bug), and after pressing submit, is validation done by php.
Chrome + wysiwyg + ckeditor is using client side validation (but with described bug that all wysiwyg buttons are disappered) if error message is shown(validation didn't pass).
Comment #12
attiks CreditAttribution: attiks commentedComment #13
attiks CreditAttribution: attiks commentedComment #14
Jelle_SThe problem was that when a submit button is pressed, wysiwyg editors get detached from their fields, so we had to reattach them if the form had errors. This should solve your problems.
Comment #15
attiks CreditAttribution: attiks commentedComment #17
kingandy CreditAttribution: kingandy commentedStill seems to be an issue in the 7.x branch. Can you post the patch that was committed to fix this in 6.x, so that we can port it forward? (Or at least check that the changes are present in our copy...)
Comment #18
attiks CreditAttribution: attiks commented@kingandy can you provide more information about what modules/editors you're using? Are you using the latest version of this module?
Comment #19
kingandy CreditAttribution: kingandy commentedWe're using TinyMCE via the WYSYWIG module. We're on Clientside Validation 7.x-1.x-dev, I've just tested it on the latest roll (2011-Oct-15) and it's still occurring.
Actually, on review, this seems to be the reverse of the bug reported in this issue (in #11 - "the client validation message is shown, but
wysiwyg js from body textarea is disabled"). The behaviour that we're experiencing is that text added to a previously-blank rich text area is not detected by the validation script ... basically the content from TinyMCE's virtual text area is not being copied to the actual (hidden) text area before the validation triggers. The rich text editor remains in play, but the validator declares that the required field is empty.
Should I make a separate issue for this or is it related enough to stay here? It does seem to be the same sort of sequencing issue.
Comment #20
attiks CreditAttribution: attiks commentedComment #21
Jelle_SFixed by making sure our code is executed after the wysiwyg javascript code
Comment #22
kingandy CreditAttribution: kingandy commentedCan you post the patch that implemented the behaviour described in #14 ("we had to reattach [the rich text editors] if the form had errors")? We are genuinely not experiencing this behaviour.
Comment #23
Jelle_SBecause we now make sure our code is executed after the code of the wysiwyg module the content from TinyMCE's virtual text area is already copied to the actual (hidden) text area before the validation triggers.
We do not have to reattach the rich text editor in 7.x because in wysiwyg.js of wysiwyg-7.x-1.x line 73-80 you will see:
Because Clientside Validation cancels the event if the form is not valid, the wysiwyg editor will not be detached and therefore we won't need to reattach it.
You can test it by downloading the latest dev from git or wait 12 hours until drupal.org updates the dev downloads on the project page
Cheers,
Jelle_S
Comment #24
kingandy CreditAttribution: kingandy commentedInstalled the latest 7.x-1.x-dev release. Content in rich text editor is now validating correctly, but we are now experiencing the behaviour described in #11 ("the client validation message is shown, but wysiwyg js from body textarea is disabled/hidden(all wysiwyg buttons disappear) and the content for this textarea is shown in html source").
Comment #25
attiks CreditAttribution: attiks commentedComment #26
Jelle_SBehavior confirmed and fixed with the same fix used for 6.x.
Comment #27
attiks CreditAttribution: attiks commentedComment #28
kingandy CreditAttribution: kingandy commentedConfirm fixed in 7.x-1.20.