Warning Message



I have a form in which you can load attach multiple documents, it is handled through 2 buttons, one to delete and one to add, normal in this case. By default, when we add that the control appears to load the document, it is necessary to load it, otherwise, the request can not be sent or forwarded.

I would like to know how I can place a notice to the user so that when I click on the add button and the attachment control is displayed, I placed the document and do not leave it empty, causing the request not to be sent.

I have used a simple javascript code to try to do this as I have done other times, but this time I have not worked for attachments. I have done the following:

if ($data.formInput.initialDocument === null)


return "If you have clicked on the add button you must place a document,
                         otherwise you will not be able to send the request.";


Any idea how to do this?



Submitted by Dibyajit.Roy on Sun, 10/01/2017 - 18:04

try using the condition like below
if (!($data.formInput.initialDocument && $data.formInput.initialDocument.length >0))
return "your message";

Submitted by vgonzalez_3 on Mon, 10/02/2017 - 21:34

Thank you very much.


No answers yet.