Gossamer Forum
Home : Products : DBMan : Installation :

OPTIONS FIELD

Quote Reply
OPTIONS FIELD
JPdeni,

I have another one for you. My option fields are not coming up as a select box. I have two...one is size and the other is color. in the field there are various levels of colors and size...another words one size field will have three options another will have four. and color is the same way. I set it up with the largest number of options available. here is the section on the option fields.
--------------------------
%db_def = (
'ProductID' => [ 0, 'alpha', 20, 255, 0, '', ''],
'OrderID' => [ 1, 'alpha', -1, 255, 0, '', ''],
'Category' => [ 2, 'alpha', -1, 255, 0, '', ''],
'Subcategory' => [ 3, 'alpha', -1, 255, 0, '', ''],
'Name' => [ 4, 'alpha', 20, 255, 0, '', ''],
'Description' => [ 5, 'alpha', '60x10', 1000, 0, '', ''],
'Image' => [ 6, 'alpha', 20, 255, 0, '', ''],
'Cost' => [ 7, 'numer', -1, 10, 0, '', ''],
'Price' => [ 8, 'numer', 10, 10, 0, '', ''],
'Size' => [ 9, 'alpha', 0, 8, 0, 'Option1', ''],
'Color' => [10, 'alpha', 0, 8, 0, 'Option1', ''],
'Date' => [11, 'alpha', -1, 255, 0, '', '']
);

# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'ProductID';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 0;
# Database delimeter.
$db_delim = '|';
# Use file locking (1 = Yes, 0 = No). Should be used, but won't work on Win95.
$db_use_flock = 1;
# Auto generate the html forms (1 = Yes, 0 = No).
$db_auto_generate = 0;
# Display Benchmarking Information (1 = Yes, 0 = No).
# use Benchmark; # Uncomment this line if benchmarking is used.
$db_benchmark = 0;
# Display Debugging Information (1 = Yes, 0 = No).
$db_debug = 0;

# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
'Size' => 'Option1,Option2,Option3,Option4,Option5,Option6,Option7,Option8,Option9,Option10',
'Color' => 'Option1,Option2,Option3,Option4,Option5'
);

It only displays the list and not an option box.

Queticon

Quote Reply
Re: OPTIONS FIELD In reply to
For this I'm going to need to look at your html.pl file. Please copy the file to a web-accessible directory (one where you would place html files) and rename it to html_pl.txt. Then come back and tell me where I can pick it up.

I have an idea of what the problem might be, but looking at the script will give me the answer.


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





Quote Reply
Re: OPTIONS FIELD In reply to
JPD,

It is here.
http://www.absolutedesire.com/products1_pl.txt

Thanks,

Queticon

Quote Reply
Re: OPTIONS FIELD In reply to
I'm confused. I looked at your file and I didn't see anything right off. So I went to your site. I tried the "View" link and the only things on the search form are

Name
Image
Price

Then I looked at the source code for your form and found that the rest of the fields were all hidden fields. I'm not sure what you want to do.


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





Quote Reply
Re: OPTIONS FIELD In reply to
Okay this is what I have done there is products.cfg and products1.cfg and products.pl and products1.pl

they both reference the same databse, except products returns only the three fields, now products1 returns all fields on the item.

What will hapen is they will do a search and return only the three fields with a link to buy or a link to view the whole itme description and everything. that is where products1 come into play. that will return one record for that item with an option to buy.

I hope this helps.

Queticon
Quote Reply
Re: OPTIONS FIELD In reply to
Okay. I sorta understand. Smile

I changed the "db=" value to "products1" and I did see your full form. I also saw the select lists right there, exactly as they should be.

Are you still having problems with them?


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





Quote Reply
Re: OPTIONS FIELD In reply to
well I guess my question is not on the form, but on the data output itself. when you do a search and the dataq is returned there is no options for the field, just the list of colors. Is there a way to get the list of colors to show up in an options field on output?

Does this make sense?

Queticon
Quote Reply
Re: OPTIONS FIELD In reply to
There are no options for the field because in order to have a select list, it must be within a form.

I really don't know what you want.


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