Hi guys, I’m new to PHP and I’m trying to sort out a site at work.
We have a form that users fill in, I’m wanting it to bring up a message if the following criteria are met
“temp1” on the form has “Shape Creation Request” selected (this is the value of an option) AND the length of “temp11” is under 22 characters
at the moment I have the following that doesn’t work:
if(document.all.temp1.str=="Shape Creation Request" and document.all.temp11.value.length <22)
{
alert("Please provide the full publication code including edition.");
return false;
}
an example of one of the alerts we have that does work is:
if(document.all.temp2.value.length <6)
{
alert("Please provide the full name of the person making the request, whether this is yourself or another user.");
return false;
}
any help would be greatly appreciated as I need to replicate this for some other fields too