The CreatorCon Call for Content is officially open! Get started here.

g_form.showErrorBox and showFieldMsg do not work at Service Portal

qqj5004
Kilo Contributor

Hi all

the onLoad Client Script with g_form.showErrorBox or g_form.showFieldMsg   do not work in Service Portal.

function onLoad() {

  var msg = 'check at lease one checkbox';

if(g_form.getValue("add_user", false)){

g_form.showErrorBox('right', msg);

}

}

This script work on CMS but not on Service Portal

Please Help!!!

Thank you

15 REPLIES 15

thanks, that worked

ytrottier
Tera Contributor

showErrorBox and showFieldMsg do not work in the portal in Istanbul.

Using addErrorMessage and addInfoMessage instead works fine for that version.

Jude S
Tera Contributor

I had the same issue recently where the g_form.showFieldMsg(..) was not displaying the message on portal.

If you try to clear the value using  g_form.clearValue(..) straight after the g_form.showFieldMsg(..) it will not display the error message.

Instead clear the value prior to displaying the error message.

 

 

This does not work!

g_form.showFieldMsg('contract_end_date','Pleaase select a date which is in the future.','error');
g_form.clearValue('contract_end_date');


Solution

g_form.clearValue('contract_end_date');
g_form.showFieldMsg('contract_end_date','Pleaase select a date which is in the future.','error');

Hi,

Thanks for the solution.

But the message is displayed and disappearing immediately.

_Kumar

I suggest opening a new "question" on this.  you'll get more eyes on the issue as you're likely only getting folks who've "Subscribed" to this question by replying or pressing the "subscribe" button.

It sounds like you might have the method to clear field messages happening after you set it.  You'll to clear the field messages before your change occures because then one error will show up.  Good luck.