Hi,
I have installed webform 3.16 and clientside validation 7.x.1.27.I added a file field in webform.When i browse any file and submit the form without clicking upload button the form gets submitted. But when i click the upload button and submit the form i am getting error. I have attached two pictures please look at it. And the error is diplayed for the field which is not manditory. For the field which is manditory the error message is not displayed. Also language translation is not working for default error messeage.("manditory field is required") .with clientside validation not enabled this error message is displayed in the corresponding language. if clientside validation enabled this error messege is displayed in english. And is it possible to show the error message in pop up box?
| Comment | File | Size | Author |
|---|---|---|---|
| sample2.png | 14.06 KB | gopisundar | |
| sample1.png | 15.83 KB | gopisundar |
Comments
Comment #1
jelle_sThis issue is blocked by #1356170: Remove all uses of array_merge_recursive, or document why they are being used instead of NestedArray::mergeDeep() because the function file_ajax_upload still uses array_merge_recursive instead of drupal_array_merge_deep.
See related issue #208611: Add drupal_array_merge_deep() and drupal_array_merge_deep_array() to stop drupal_add_js() from adding settings twice
Comment #2
attiks commentedComment #3
attiks commented#1356170: Remove all uses of array_merge_recursive, or document why they are being used instead of NestedArray::mergeDeep()
Comment #4
liam morlandIn #1525784: Drupal.settings.content_lock.internal_urls is array instead of string, breaks file.module's JavaScript, item #13, the patch addresses that issue by avoiding calling drupal_add_js() more than once. Would that solution work here?
Comment #5
jelle_sIt might fix the ajax upload issue, but it will probably break other functionality.
For example:
If you have a form with a button that triggers an ajax callback that adds more fields to that form. If we don't add the settings again, those extra fields won't get validated by Clientside Validation. Think for example of a multiple value email field. The first field will have email validation, but when you then click "Add more items", those fields won't get validated by CV.
Well, that's the theory anyway. I'll give it a try just to be sure.
Comment #6
jelle_sThat approach does indeed work for the ajax upload.
Apparently multiple value fields don't work for CV, not even before this approach, so I'm going to mark this as fixed and create a new issue for that.
Thanks for sharing the patch from the other issue!