var fields = g_form.getEditableFields(); for (var x = 0; x < fields.length; x++) { if (fields[x] === 'start_date' || fields[x] == 'end_date') { // alert("x: " + fields[x]); if (get_start_date == '' || get_end_date == '') { g_form.addErrorMessage("Date de début planifiée et/ou Date de fin planifiée doit être remplies !"); return false; } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter