Gossamer Forum
Home : Products : DBMan : Installation :

hidden field not working

Quote Reply
hidden field not working
I have the following hidden field:

<input type="hidden" name="onweb" value="y">

It works fine in searches using select fields (as defined in my .cfg) as the input, but a keyword search (using text input) displays records that do not have value "y" as well as records that do.

Any ideas? Thanks

rdavis

Quote Reply
Re: [rdavis] hidden field not working In reply to
Just out of curiosity exactly how you do a key word search on a particular field?


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] hidden field not working In reply to
My keyword search and my select field search are two different forms. On both, I wish to exclude records that contain value "y" for the field "onweb".

Thanks for your reply.

rdavis
Quote Reply
Re: [rdavis] hidden field not working In reply to
OK. I understand.

but on your key word search form, exactly how do you specify the search? Details, por favor.


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] hidden field not working In reply to
Here's my keyword search form:

<form action="http://www.americanyouthcircus.org/cgi-bin/db.cgi" method="GET">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<input type="hidden" name="onweb" value="y">
<input type="hidden" name="sb" value="1">
<br>
Search by keyword. <br>
<INPUT TYPE="TEXT" NAME="keyword" SIZE=15 MAXLENGTH=255>
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="Search">
</form>

Quote Reply
Re: [rdavis] hidden field not working In reply to
your <input type="hidden" name="onweb" value="y"> is not making it to the query...

http://www.americanyouthcircus.org/...;view_records=Search

how have you defined your onweb field in your default.cfg?


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] hidden field not working In reply to
The form that is live on the net now does not have the "onweb" field in it. The form that was sending back the wrong records a (the one with "onweb") was a test form that I temporarily put up. But when it was up, the query was...

http://www.americanyouthcircus.org/...;view_records=Search

In addition to the test html.pl file, I also had a test .cfg file. In this file I defined "onweb" as...

onweb => [32, 'alpha', 2500, 255, 0, '', ''],
Quote Reply
Re: [rdavis] hidden field not working In reply to
since it is only one character why not define it as onweb => [32, 'alpha', 1, 1, 0, '', ''],

check the data base and make sure that is in fact a y in the field

Can you perform a successful search thru the admin center?


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] hidden field not working In reply to
I made the test form live again at:

http://www.americanyouthcircus.org/...lt&view_search=1

I'll keep it live there for a while so you can take a look.

Whether I'm in admin or default, the searches from the select boxes include only records with onweb=y, but the search by keyword returns with and without onweb=y.

Now this may be related or not, but in the keyword search, all the records that contain onweb=y are displayed correctly with the fields displayed where they should be, but the records that do not contain onweb=y are one field off (e.g. the zip code is displayed where the email address should be). This suggests to me my database has an extra field in it somewhere, or some other form of corruption (I have been diddling with it manually).
Quote Reply
Re: [rdavis] hidden field not working In reply to
when I run that query, it shows 687 records. As I recall, when I ran the previous query (the one with onweb=y), it only showed 70(?) records.

if you have an extra field, you will see it in the admin center when you view/modify a record.

i'm not sure I understand if you are able to run a successful search from your admin center on just the onweb field?


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] hidden field not working In reply to
The previous query (that returned 70 records) was made from my original form that queried a database with no "onweb" field. Your latest search (that returned 687) was from my testform. This new form is querying a new database that contains the "onweb" field.

I changed CFG so that DBman autogenerates forms (just in case I was screwing things up with my coding of forms), and then I tried a search from the admin center for "y" in just the onweb field, and it returned nothing. "Error: no matching records."
Quote Reply
Re: [esm] hidden field not working In reply to
If I delete the "keyword" bit from the string and just use "onweb=y" I get 130 records is that a correct number? If so then the problem is with the keyword. Somehow it is not returning Keyword=blah and onweb=y. (which should be 130 records or less - right?)

Have you check LoisC's unofficial FAQ for searching on multiple fields? I think there is a fix for this.

Or are you trying to achieve just the opposite effect?

Last edited by:

Watts: Mar 1, 2003, 2:45 PM
Quote Reply
Re: [Watts] hidden field not working In reply to
Thank you, ESM, for joining in.

Yes, 130 records is exactly correct. So, I think you are right in assuming it is not returning Keyword=blah and onweb=y.

I'm not familiar with where to find LoisC's FAQs. Could you let me know where it is? Thanks, again.

rdavis
Quote Reply
Re: [rdavis] hidden field not working In reply to
Here is the direct URL

http://webmagic.hypermart.net/dbman/db/dbfaq.cgi?db=dbmanfaq

You'll have to sign up for an account, but it's free (notice what program she uses to run the FAQ?)

Look around and I'm sure you'll find the MOD that will help.

Good Luck!