Glide Dialog Window - Mandatory Fields

masella
Giga Contributor

Hi All,

 

I've recently began using Glide Dialog Windows and have encountered an issue where if there are mandatory fields on the original form when i press the UI Action to trigger the dialog window it doesn't check whether the mandatory fields have been entered or not. Instead it proceeds to opening the dialog window.

 

Essentially I need the dialog window to not open if the current form still has mandatory fields that have not been entered.

 

Would appreciate your help.

 

Cheers

Anthony

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

I have this handy with me


add this check in your ui action.. should do the trick......



for (var i=0; i<g_form.elements.length; i++) {


              if(g_form.isMandatory(g_form.elements[i].fieldName))


                      {


                      alert('Please Fill The Mandatory Fields Before Proceeding');


                      return;


              }


      }


View solution in original post

4 REPLIES 4

Kalaiarasan Pus
Giga Sage

I have this handy with me


add this check in your ui action.. should do the trick......



for (var i=0; i<g_form.elements.length; i++) {


              if(g_form.isMandatory(g_form.elements[i].fieldName))


                      {


                      alert('Please Fill The Mandatory Fields Before Proceeding');


                      return;


              }


      }


Kalai thanks very much appreciated.


Just wanted you to know that this has helped me tremendously.



didn't know that I can grab all the elements at once! Thanks!


Glad that it helped Cheers!!!