Gossamer Forum
Home : Products : DBMan : Customization :

Û_checkbox_fields

Quote Reply
Û_checkbox_fields
This is my ....

%db_checkbox_fields = (
'Besonderes' => '1.Hand, 2.Hand, Anhängerkupplung, Automatik,
Katalysator,Servolenkung,Airbag,ABS,Schiebedach,Klimaanlage,
Zentralverriegelung,elektr.Fensterheber,Radio/Cass,Radio/CD,3.Bremslicht'
);

and my ...

%db_def = (
'ID' => [ 0, 'numer', 20, 10, 0, '', ''],
'Autor' => [ 1, 'alpha', 20, 255, 0, '', ''],
'Hersteller' => [ 2, 'alpha', 40, 255, 0, '', ''],
'Modell1' => [ 3, 'alpha', 40, 255, 0, '', ''],
'Modell2' => [ 4, 'alpha', 40, 255, 0, '', ''],
'Ausstattung1' => [ 5, 'alpha', 40, 255, 0, '', ''],
'Ausstattung2' => [ 6, 'alpha', '40x5', 1000, 0, '', ''],
'Türen' => [ 7, 'alpha', 20, 255, 0, '', ''],
'Hubraum Motor1' => [ 8, 'alpha', 10, 255, 0, '', ''],
'Hubraum Motor2' => [ 9, 'alpha', 40, 255, 0, '', ''],
'Erstzulassung' => [10, 'alpha', 10, 255, 0, '', ''],
'Leistung KW' => [11, 'alpha', 10, 255, 0, '', ''],
'Leistung PS' => [12, 'alpha', 10, 255, 0, '', ''],
'KM-Stand' => [13, 'alpha', 10, 255, 0, '', ''],
'Farbe1' => [14, 'alpha', 20, 255, 0, '', ''],
'Farbe2' => [15, 'alpha', 20, 255, 0, '', ''],
'Besonderes' => [16, 'alpha', 20, 255,0, '', ''],
'Sonstiges' => [17, 'alpha', '40x5', 1000, 0, '', ''],
'Mwst ausweisbar' => [18, 'alpha', 10, 10, 0, '', ''],
'Verkaufspreis DM' => [19, 'alpha', 10, 255, 0, '', ''],
'Verkaufspreis Euro' => [20, 'alpha', 10, 255, 0, '', ''],
'Eingabedatum' => [21, 'alpha', 10, 255, 0, &get_date(), ''],
'Telefonanfrage' => [22, 'alpha', 40, 255, 0, '', ''],
'Faxanfrage' => [23, 'alpha', 40, 255, 0, '', ''],
'eMail Anfrage' => [24, 'alpha', 40, 255, 0, 'info@weisrock.de', '.+@.+..+'],
'Homepage' => [25, 'alpha', 40, 255, 0, 'http://', '^http://'],
'Graphic' => [16,'alpha',0,3,0,'','Yes']
);


When I save a new record, save only one from my checkbox
Sample: I click 4 checkbox on and the I see in the list only one.

What is wrong ?

Thank you.

WernerW


Quote Reply
Re: Û_checkbox_fields In reply to
The problem is most likely attributed to reserved characters you are using in the %db_checkbox_fields.

Try using only words...not 1., 3., etc.

Regards,

Eliot Lee
Quote Reply
Re: Û_checkbox_fields In reply to
Also the regex for the 'email Anfrage' field is wrong.

Should be:

.+@.+\..+

The way you currently have it, it would accept:

paul@paulXcom
paul@paul"com
paul@paul*com
paul@paul&com

or anything where X is any character.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: Û_checkbox_fields In reply to
Thank you for the message, but my problem is the same.

In the default.db I found only the first db_checkbox_fields
not the second or the thirt ...
The Script is not saving the right word. You have another idea ?

WernerW


Quote Reply
Re: Û_checkbox_fields In reply to
My Problem is not finish. Have anyone person a idea for help.

I have check all script, but I found not the error.

Thanks

WernerW



Quote Reply
Re: Û_checkbox_fields In reply to
I think the error is in this sub ...
but I found this not ...


sub parse_form {
# --------------------------------------------------------
my (%in);
my ($buffer, $pair, $name, $value);

PAIR: foreach $name ($query->param()) {
$value = $query->param("$name");
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s///g;
if ($value eq "---") { next PAIR; }
(exists $in{$name}) ?
($in{$name} .= "~~$value") :
($in{$name} = $value);
}
return %in;
}

Quote Reply
Re: Û_checkbox_fields In reply to
I have changed a original DB-MAN Script with multiupload mod. It is work but I can not add more the one %db_checkbox_fields = ( Popular => 'Yes' ),


The second and the thirt is not displaying in html_record when click this.

I think this is not only my problem, it is a bug in the mod.

Have anyone this problem too ? Test you script with multiupload too, please

Thank you.

WernerW


Quote Reply
Re: Û_checkbox_fields In reply to
I think you may not be understanding how to use the checkbox fields? Please check the FAQ noted below under the section "Fields" and look under "Field Definitions & Use" for tips on using checkbox fields.

There are also a few references for: Using multiple checkboxes that each have a db field

Hope this helps



Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/