Gossamer Forum
Home : Products : DBMan : Installation :

Checkboxes in cfg file

Quote Reply
Checkboxes in cfg file
What is the proper syntax for setting up checkboxes in the config file. The example in the default.cfg has one check box. I want to setup multiple ones, for example:
Payment Method: Visa Mastercard AMX -- all with checkboxes to select from. This is in the autogenerate form section.
Quote Reply
Re: Checkboxes in cfg file In reply to
Are you sure you want checkboxes? Checkboxes allow the user to enter more than one option, so that a user could enter both "Visa" and "AMX." I would think a better choice would be radio buttons.

However, this isn't the question you asked. To enter multiple checkboxes, use

%db_checkbox_fields = (
Mastercard => 'Yes',
Visa => 'Yes',
AMX => 'Yes'
);


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





Quote Reply
Re: Checkboxes in cfg file In reply to
Thanks -- the credit card stuff was just an example. The code snipet was great!
Quote Reply
Re: Checkboxes in cfg file In reply to
Thanks for the reply on checkboxes but in your example it seems that I will get check boxes on each line of the form. Here's what I want to do:

------------------------------------------
Payment Method: | [] Visa [] Mastercard
| [] AMX [] Bank Draft
-------------------------------------------
The vertical bars separate cells in a table.
The horizontal lines show one row in a table. How Can I autogenerate the above example.
Quote Reply
Re: Checkboxes in cfg file In reply to
You can't autogenerate the example you gave. If you want them on one line, you'll have to create your own html_record_form.


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