How to put g_form.hideAllFieldMsgs() in use

Community Alums
Not applicable

Hello,

I am trying to put g_form.hideAllFieldMsgs in use but am failing. Kindly help.

 g_form.addInfoMessage(g_form.getOption('state', '1').text);

g_form.hideAllFieldMsgs();

I am still seeing 'New' message on top.

Regards

8 REPLIES 8

Yaraslau
Tera Guru

You should use g_form.clearMessages();

 

Mark my answer helpfull or correct if it helps

Community Alums
Not applicable

Hi,

Hides info and error messages for a single field.

Eg:g_form.hideFieldMsg('impact', true);

Community Alums
Not applicable

You can use this g_form.hideAllFieldMsgs();  to hide all the field messages.

 Hope these two answers will definitely help you and provide you a better understanding of the concept of both methods.

Regards,

Priyam Kaushik

Community Alums
Not applicable

None of the above worked. I used

 g_form.addInfoMessage(g_form.getOption('state', '1').text);

 g_form.hideFieldMsg('state');

g_form.hideFieldMsg('state',true)

I see 'New'

Regards