3

This question is partially addressed here.

Only I am using the Angular version of the plugin, and I would like to allow my user to use the form that the bluimp plugin is applied on even without a file.

I tried setting 'disableValidation' option to true, but it didn't help.

I thought to define a $scope variable once the 'fileuploadchange' event triggers at least one, and if this variable remain undefined, use another submit handler on the click or submit event. But there must be a cleaner way than that.

A plunk to emphasize to problem: http://plnkr.co/edit/J1JDYO?p=preview

Community
  • 1
  • 1
Oleg Belousov
  • 9,981
  • 14
  • 72
  • 127

1 Answers1

1

Oleg, try to change button type to "submit"

<button type="submit" class="btn btn-primary start" data-ng-click="submit()">
<span>Submit text field without file</span>
</button>
Max
  • 156
  • 5