Gossamer Forum
Home : Products : DBMan : Customization :

Multiple Select Field Data

Quote Reply
Multiple Select Field Data
Hi, can you, with DBMan, make a multiple select TextBox Field? For example, say I asked, "What are your favorite Color(s)?" and the selections in the TextBox are "Red, Green, Yellow, Purple, Blue, Black, etc.". They want to select "Red, and Blue". I figured out how to allow people to multiple select, but the options they select are seperated by pipes. Which royally screws up the database, because the database is tab-delimited. How can I change the spacers, from the selected options (refer to example) from pipes, to say comma's or colons? Any suggestions would be appreciated. Danke..

Chris
Quote Reply
Re: Multiple Select Field Data In reply to
What code are you using to allow for multiple selections?


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





Quote Reply
Re: Multiple Select Field Data In reply to
Do you want to change the delimiter character of your database file?

If so, in your default.cfg, change the following variable: $db_delim

to

Code:
$db_delim = = ',';

OR

Code:
$db_delim = = ';';

If you want to create a multiple select drop-down menu, Carol did come up with a mod for this...I can't seem to recall if the Thread is in this forum or in DBMAN Installation Forum. Yet this multiple select drop-down menu does not work in the search form. It only works in the add and modify record screens.

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Multiple Select Field Data In reply to
Eliot,

If you could point me in the direction of that MOD, I would appreciate it. Also, I would just need the multiple selects in the Add, and Modify screens. So hopefully someone could helpe about that.

Chris
Quote Reply
Re: Multiple Select Field Data In reply to
Actually, if you will look at your DB file, you will notice that the selections aren't seperated by pipes at all, but by ~~. There is a sub in the CGI file that converts the ~~ to | for diplay reasons. If you would simply insert this code in the top of the html_record sub, you should be fine.

$rec{'your_select_field'} =~ s/\|/whatever_you_want_to_replace_pipe/g;

------------------
WFMY-TV Webmaster