Jump to content

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

Recommended Posts

Posted

My online database is launched and working...Hooray (and thanks for the help!!)

I have another question: How can I get a required field to work in the search screen?

This is what I have for the field:

Enter Species (Required)???

<INPUT TYPE=hidden NAME="-op" VALUE=eq>

<SELECT NAME='Species'>

<OPTION VALUE="-"> [FMP-VALUELIST: Species, LIST=Species]

<option [FMP-ValueListItem]> [FMP-VALUELISTITEM] [/FMP-VALUELIST]

</SELECT>

I thought by making OPTION VALUE="-", it would default to that value if no other value was selected. But, the search is working even if Species is not entered and I don't want it to!!

The search page is at www.herdease.net:591/search.htm.

Thanks.

Posted

You can use some Javascript to test if a selection has been made before the Form is submitted.

You could also try this:

Enter Species (Required):

<INPUT TYPE="hidden" NAME="Species" VALUE="==">

<SELECT NAME='Species'>

<OPTION VALUE="">Select a Species</option>

[FMP-VALUELIST: Species, LIST=Species]

<option value="[FMP-ValueListItem]">[FMP-VALUELISTITEM]</option>

[/FMP-VALUELIST]

</SELECT>

Good Luck.

Garry

Posted

Thanks, Garry. I think this is what I was trying to do with the OPTION VALUE="-"; preset a value that I know would not be in the field, and that would create a no records found result. Just didn't have it in the right place!

This topic is 7176 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.