Whenever I try to add:Function CheckFields() to the JS Header on a form, I keep getting…
Missing ; before statement… (WTF !)
Yet all examples I see don’t have a ;
This is just ticking me off big time.
I’m putting this in the form’s JSHeader
Function CheckFields()
{
var message = “”;
if (Field1 == “”)
{message = message + “Name Field. \n” ;}
if (Field2 == “”)
{message = message + “Title Field. \n” ;}
if (Field3 == “”)
{ message = message + “Dept Field. \n” ;}
if (Field4 == “”)
{ message = message + “Hobby Field. \n” ;}
if( message.Length > 0 )
{
alert( message + “\n Please fill in the required areas listed\nabove before submitting document\n\nThank you” );
}
}
And this on the submit button…
CheckFields()
Can anyone help me with this please?