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?

CommentFileSizeAuthor
sample2.png14.06 KBgopisundar
sample1.png15.83 KBgopisundar

Comments

jelle_s’s picture

attiks’s picture

Version: 7.x-1.27 » 7.x-1.x-dev
liam morland’s picture

In #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?

jelle_s’s picture

It 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.

jelle_s’s picture

Status: Postponed » Fixed

That 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!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.