I have created an external list and in the new form I have a few input controls. Some of them are required fields but are not indicated as such on page. So I am trying to check if the input is empty and show a message that they need to fill it in. But the problem is that once the button is clicked it immediately sends the user the list. So, how can I cancel the click event if the fields are empty?
$('#ctl00_ctl40_g_9068430e_e259_454c_8cfa_f5a629496c52_ctl00_toolBarTbl_RightRptControls_ctl00_ctl00_diidIOSaveItem').click(function()
{
var descText = $('#Description_$TextField').val();
if(descText=='')
{
$('#Description_$TextField').append('<p>Please enter a description</p>');
return false;
}
});