Gossamer Forum
Home : Products : DBMan : Installation :

Prob w/ Multiple Checks in Checkbox after Adding Upload MOD

Quote Reply
Prob w/ Multiple Checks in Checkbox after Adding Upload MOD
Howdy,
I've just added JPDeni's Upload File MOD (4.29.00 version) ... and it works beau
tifully.
However, now a checkbox field will only store one of the options selected. It w
orked fine before, by parsing the options like

(in default.db)
anotherfield|option1~~option2~~option3|anotherfield

and in the Record view, it simply displayed all of what was selected, like

Field: option1 | option2 | option3

The only thing that I can think of that could be causing this (after looking at
all the html.pl changes, etc, is that the Upload MOD has me replace the sub pars
e_form in db.cgi - which might've been what took the multiple checkbox options a
nd parsed them for the database.

Please tell me I'm missing something obvious - I'm a recent initiate Smile

Thank you!
What an excellent program!
Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
I'm not sure why it would make a difference, but you can try taking out the line

Code:
unless ($value) { next PAIR; }

which is the only thing I can think of in sub parse_form that would make a difference.


------------------
JPD






Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
JPD,
Thanks,

I removed that line of code, and am still having the problem. I was just "guessing" that the sub parse_form was it, because it has lines that apparently adds in the ~~ separator -

Code:
($in{$name} .= "~~$value") :
($in{$name} = $value);

but since your Mod keeps those, I don't know why it's now only storing one selection. I have triple-checked the html.pl files, and compared it to the version that works (pre-Upload-MOD) and the html is the same for the checkbox inputs. The only difference is in what gets stored in the database.

From default.cfg, here's the field definition

Code:
'Processes used' => [ 7, 'alpha', 0, 255, 0, '', ''],

and the Checkbox definition

Code:
%db_checkbox_fields = (
'Processes used' => 'Flower Essenses,MAP,Pro-MAP,MBP,Soil Gardening,Soil-less Ga
rdening',
'Picture' => 'Yes'
);

I didn't change any of this, or the html, so I am not sure exactly why adding the upload MOD would effect this.

Thanks so much for your help!
Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
Is this only when you add or modify a record?

What exactly is happening now?

I'm thinking this may be related to the CGI module, but I don't know a lot about it.


------------------
JPD






Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
Hi Carol,
This has been a problem in my DBMan also. I'm running User Friendly and Short/Long and in the record have only two occurences of (separate) checkbox inputs.

All of the values of these fields are not brought in to the Modify Form. Prior to Update, I checked the DB - the values are intact. Upon selecting Modify, one of the values get cleared but this is the interesting part:
Getting the data into the Modify Form clears ONE of the EXISTING field values (physically, the last value in the field).
So, if initially, two (of my four) checkbox options are selected, on the first Modify, one drops out (physically, the last one). If I select Update again - calling the Modify Form again - ANOTHER value drops out, such that field is left empty.

This happens consistenyl for all checkbox fields in my db.

Now, this would be great if we wanted to grant someone say four updates to their data and needed a counter (of sorts!). But it doesn't work too well if you want the values initially entered upon ADD.

Thanks!
-Val
Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
Val, if you could give me the following, it would help a lot--

Post your Û_radio_fields definition and the portion of a record that includes a multiple selection of checkboxes.



JPD
Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
Here is the record layout for the fields in the DB )I know you didn;t ask for this, but if I made a stupid mistake and you need this, well, here it is!):

[Note from JPD -- too much info!! I had to delete a lot of this so I could find what I needed.]

# Checkbox fields. Not Functioning
# Space the possible selections on both sides, otherwise they will appear jammed together
Û_checkbox_fields = (
Certificate => 'ATP,Commercial,CFI,CFII',
Degrees => 'AA,AS,BA,BS,MA,MS,PhD,Other');


# Portion of a record
# Note also that the presence of the email has mucked with the data as well - creating what appears to be an email "link" from just before that field (where the Select Fields are) to the beginning of the Radio button field - very strange. Maybe I should say that it appears that the presence of the email has created a problem...but maybe it is really in my select fields? (I am too confused right now to maintain any semblence of coherency so, please - have at it).

21-Apr-2000|sundawg2|21-Apr-2000|Brad|Ludwick|6048 E Fairfield st||Mesa|Az|85205|United States|United States|Not Applicable|sundawg2@aol.com|480-807-4625|||4600|4500|3100|3100|500|650|1650|0|ATP ~~ Commercial ~~ CFI ~~ CFII|1st Class Medical|piper|cheyenne IIxl|1600|0|cessna|340|200|0|cessna|421|100|0|piper|cheyenne 1|200|0|cessna|425|100|0|cessna|310r|600|0||||||||||||||||123456789||none|AS|Looking for long term corporate only. Thanks Brad

07-Jun-2000|test3|07-Jun-2000|Test3|Test3|1234 Main Street||Anywhere|FL|43219|United States|United States|Not Applicable|Test3@balamara.com|954-123-4567|954-123-4567||100|10|10|0|0|0|0|0|Commercial|3rd Class Medical|PA-28-180|Cherokee 180|15|0||||||||||||||||||||||||||||||||||||123456789|||AA ~~ BS|Test3 hunting down the checkbox error.



Thank you.


Valerie
http://www.ad-ink.com
Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
Sorry to edit your post, but I couldn't find what I needed with all the info.

I'm going to have to go out soon, but when I get back, I'll try working with your data and see what I can figure out.


JPD
Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
Not a problem - I'll be more succint in future!

I appreciate your help.

Val

Valerie
http://www.ad-ink.com
Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
It appears that the problem is fixed...and here is my Hail Mary Midnight Analysis...

The Checkbox field data was being dropped because the field data had spaces between the ~~ and the data. In other words, what should have been ATP~~CFI was ATP ~~ CFI. I am not certain HOW the data was fed to the database this way, only that it isn;t occurring this way now.

After going through the *.cfg - especially the record layout - and just staring at all of the files in my DBM directory, I think my sloppiness got the better of me. First, there was a default.cfg, with the db.cgi pointing to it. And there was a pilot.cfg with not only a different record layout but two fields with the same number - not good. Next there was the calls to not only a non-existent default.db but to the pilots.db. And finally there was the record itself - with more fields than what the pilot.cfg called for. (This is no doubt the result of my chaotic personality and my shelving this project four months ago only to pick it up just this past Sunday). It only took me four hours to find and fix the bloody problem - and I still cannot be certain what the root cause was.

Tomorrow I'll try duplicating the problem (in a different sub-dir, with a smaller dataset) in an attempt to prevent someone else from being as plain stupid as I.

Carol, THANK YOU for your help.

G'nite I've had enough brain warping for one night.



Valerie
http://www.ad-ink.com
Quote Reply
Re: Prob w/ Multiple Checks in Checkbox after Adding Upload MOD In reply to
Smile I'm just glad you figured it out!



JPD