Get a list of all mandatory fields portal

Snow Tomcal
Tera Expert

Hi All,

I want to get a list of all mandatory fields in the portal.

Does anyone know how to do it? 

 

Thanks in advance 🙂

11 REPLIES 11

Samaksh Wani
Giga Sage
Giga Sage

Hello @Snow Tomcal 

 

var arr = g_form.getMissingFields();

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

 

I get an error : g_form.getMissingFields is not a function

Hello @Snow Tomcal 

 

if you are looking for portal :-

 

document.getElementById(form).querySelectorAll("[required]")

 

Now I get - TypeError: Cannot read property 'getElementById' of null.