Gossamer Forum
Home : Products : DBMan : Customization :

apostrophes

Quote Reply
apostrophes
I'm not too good with programming, so I hope someone can explain to me in simple terms what I should do.

In default.cfg, for the definition of the field names, there is this 'default' field. As far as I understood it, it means that whatever is entered there will be entered or selected as a default when creating a new form.

I have a field with checkboxes, and I want multiple checkboxes to be checked. Is this possible? And if so, is it possible to have an apostrophe in one of the names? I'm guessing not, but I can't figure out a way around it. In the definition of the checkbox fields I used double quotes ("), so I could enter the apostrophe in the name without problems. However, when I try to use double quotes for the 'default' setting, and then the apostrophe inside these double quotes, it doesn't work. The fields are not checked when I create a new form.

Can anyone help?
Quote Reply
Re: [alhena] apostrophes In reply to
Checkboxes are, by nature, not multiple select items. They are an "on/off" switch. Either it is or it isn't. You'll need to make a field for each of your checkbox fields.

The default value must be within a single quote when defining it within the field value such as:

'Graphic' => [20,'alpha',0,3,0,'','Yes'],

If you need to add an apostrophe where you actually define the values of your checkboxes within:

%db_checkbox_fields =

then use a / before the apostrophe. for instance if you wanted to use alhena's you could enter it as alhena/'s

If that doesn't solve your problem, please check the tutorial on JPDeni's web site http://jpdeni.com/dbman/ or check the FAQ noted below under the section "Fields".

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] apostrophes In reply to
Thanks for your help. I was under the impression that checkboxes could be used for multiple items. So I'll need to define a new field for each item that I want to have a checkbox for.

I've read the tutorial already (it helped a lot to set up my database in the first place). I'll check out the FAQ, too. I guess I'll come back if I still have questions...
Quote Reply
Re: [alhena] apostrophes In reply to
Quote:
then use a / before the apostrophe. for instance if you wanted to use alhena's you could enter it as alhena/'s



hmmm....I was under the impression it was the "other" slash:

Code:
alhena\'s


as I remember Crazy, you have to use MULTIPLE in the select statement.

and the perl code has to handle the multiple submission. search the LINKS forum for alt categories. I know it was done there.


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] apostrophes In reply to
Hm, how does this multiple select statement work? Is this for checkboxes? I have searched through the Links forum but I don't understand how this relates to my issue...
Quote Reply
Re: [alhena] apostrophes In reply to
ooops. Sorry about that. Didn't read close enough.

however, I would think the process similar in that you want to select multiple check boxes. But if programming is not your thing, you will probably need ready-made solution.

Good luck on your search...!


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [alhena] apostrophes In reply to
Your best bet is to define a field for each checkbox. This would make it easier to have a default value set for each.

I think there have been others who have created a method of having checkboxes used in other ways, but I dont' have a thread reference .. you will need to either check the FAQ or do a search within the DBMan forums.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/