If caller's email id (use custom field)

TanujB
Tera Contributor

. If caller's email id (use custom field) description is empty, then while submitting form will display an error message and it will not submit.  I am stuck in this please provide a answer for this

2 REPLIES 2

J Siva
Tera Sage

Hi @TanujB 
You can achieve this via either onChange or onSubmit client script.
Share the script which you've written.
It'll help us to debug.
Regards,

Siva

GlideFather
Tera Patron

Hi @TanujB,

 

this is a draft of client script onSubmit:

(not tested, you need to validate)

function onSubmit() {
var yourField = g_form.getValue('field_name'); //rename field_name
    if (!yourField) {
        g_form.showFieldMsg('yourField', 'Field is required before submitting.', 'error');
        return false; // submission is aborted
    }
    return true; //submit ok
}


Replace field_name with your field name

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */