Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6422 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I need to be able to find based on multiple criteria in a form and I'm running into a problem. The user should not be able to proceed if they don't fill in both fields, but the form is going to the action page instead of the error page if they leave either or both fields blank. I've tried adding the -lop "and" and also the fieldname.op "eq" to no avail. I don't have this problem in my inline statements, just the form. Any ideas what's wrong?

hitlist.xsl

Please enter your Make and Model.

Make

Model

Search for Parts

Thanks in advance for your help.

Posted

In your database, add a calculation field, which is called make_model and concatenates the values in fields make and model.

Add this field in your form, with

Add also

Add a onsubmit="javascript:submitvalues()" call to your form tag

The JavaScript function looks like this:

function submitvalues()

{

var vkey1=document.searchform.make.value;

var vkey2=document.searchform.model.value;

if (vkey1 == "") vkey1="dummy";

if (vkey2 == "") vkey2="dummy";

if (vkey1.indexOf("*") > -1) vkey1="dummy";

if (vkey2.indexOf("*") > -1) vkey2="dummy";

document.searchform.make_model.value=vkey1+vkey2;

return true;

}

This should work and also check for entered * .

This topic is 6422 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.