showFieldMsg is not working in workspace

Sri_9
Tera Contributor

Hi,

I'm trying to show field msg in workspace using g_form.shoFieldMsg() after clearing the value, the value is getting cleared but the message stays for a fraction of second and disappears. Please suggest how to fix this issue.

Thanks in advance.

15 REPLIES 15

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Sri_9 Can you share your script?

Sri_9
Tera Contributor

Hi Sid,

I wrote an on change client script and the script is something like this:

 

var test = g_form.getValue(’u_test’)
var regex = /^[^, ]+$/;
if (test != '' && !regex.test(test)) {
g_form.clearValue('u_test');
g_form.showFieldMsg('u_test', 'Please enter a valid value’, ā€˜error');
}

Why you are trying to clear field value before the show field msg? Please try to clear value after show field message if i have correctly understand your requirement.

Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru

Hi @Dnyaneshwaree ,

If I write the message before clearing the value the message isn't showing up at all.