+ 3

Enable submit button only when file is uploaded

I have a form in which I have <input type="file"/> like so, https://code.sololearn.com/W6Eo0HXn0pGT/#html I've tried using "fileForm.$invalid" as suggested here: https://stackoverflow.com/questions/37016246/ But, it doesn't worked out. However, it seems (from reading comments) like it worked for the asker. What I am doing wrong?

3rd Jun 2019, 5:38 PM
777
777 - avatar
2 Respostas
10th Jun 2019, 8:21 AM
Silvan Kohler
Silvan Kohler - avatar
+ 3
Set the Button type to submit EDIT: And as well the file box to required.
10th Jun 2019, 8:21 AM
Silvan Kohler
Silvan Kohler - avatar