AnsweredAssumed Answered

how can i show errors' message like it shows in fields required in CE

Question asked by Óscar del Río on Feb 6, 2017
Latest reply on Jul 20, 2017 by Sohan Tirpude

Hello everyone.

I override check_from function to do a validation of custom fields but, how can i show errors' message like this?

This errors' message shows when i try save a required fields empty. And i want show my messages like this under de fields where the custom error was found.

 

My js code to override check_form is:

function ckContactTaken()
{
    if (document.getElementById('identificador_c').value === '') {
        alert("Vacío");
        return false;   
    }
}

 

function check_form(formname)
{
    bValid = false;
    if(typeof(siw)!='undefined'&&siw&&typeof(siw.selectingSomething)!='undefined'&&siw.selectingSomething) return false;
    bValid = validate_form(formname,'');
 
    if(!bValid) return false;
   
    if(!ckContactTaken()) return false;
   
    return true;  
}

 

Thanks to this post: How can I override the check_form function in javascript? 

 

Someone knows how to show these messages.
Thanks to all.

Outcomes