I have a list where I use Infopath Forms. Users use these forms to enter data. They should also attach something in the form, but if they don't attach anything and click save, I want that the item is not saved, but a textbox becomes visible where they have to write the reason for not attaching a file. I have not found a way to accomplish this out of the box in InfoPath or SharePoint Designer 2013. I also have not found a way to enter client side code with JavaScript in InfoPath. I also don't have the possiblity to add a Content Editor web part.
Is there a way to implement this validation logic in InfoPath?
Add a comment
|
1 Answer
If I understood you correctly, you just need to make your attachments mandatory, right!
So in this case, you can do the following:
In your
data source, Right-click theattachmentfield, and selectPropertiesAt
Validation, setAttach is blank
Read more at how to make attachments mandatory in InfoPath,. Also, you can find another workaround at Make attachment field mandatory in InfoPath
-
No. It is not just making the attachment mandatory, but to make another control (a textbox) visible, prevent the form from closing and force to the user to enter a text, if the attachment field is blank when the user tries to save the form.Code Pope– Code Pope2022-03-29 18:06:20 +00:00Commented Mar 29, 2022 at 18:06