Jump to content
Sign in to follow this  
Leslie MacNeill

problem finding multiple criteria in form

Recommended Posts

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?


Please enter your Make and Model.



Search for Parts

Thanks in advance for your help.

Share this post

Link to post
Share on other sites

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";


return true;


This should work and also check for entered * .

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

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