Gossamer Forum
Home : Products : DBMan : Installation :

Back again!! =)

Quote Reply
Back again!! =)
Hi folks... I have a small and (I hope simple) question. I have a field that is using a radio button for giving a Yes or No answer. I would like to have it default to No. Looking through the default.cfg, I see where I have the options for the answers for radio buttons... but how would I have it default to No until modified?

Thanks again for such a great tool!!!

Ziggy
Quote Reply
Re: Back again!! =) In reply to
In your .cfg file, in the section where you define your fields, the next to the last variable on each line is the default value. Set this to 'No'.


------------------
JPD
Quote Reply
Re: Back again!! =) In reply to
Hi JPD!! LTNS!

I have it set the way you described and actually was that way already. But the Radio Field for No is not defaulting. That field is still empty.

Code:
%db_def = (
ID => [0, 'numer', -2, 8, 1, '', ''],
NickName => [1, 'alpha', 40, 255, 1, '', ''],
RealName => [2, 'alpha', 40, 255, 1, '', ''],
Age => [3, 'numer', 3, 3, 1, '', '[\d+]'],
Sex => [4, 'alpha', 0, 6, 1, '', 'Male|Female|Couple'],
Date => [5, 'date', 12, 15, 1, &get_date, ''],
City => [6, 'alpha', 40, 255, 1, '', ''],
State => [7, 'alpha', 40, 255, 1, '', ''],
Country => [8, 'alpha', 40, 255, 1, '', ''],
Email => [9, 'alpha', 40, 255, 1, '', ''],
Subscribe => [10, 'alpha', 0, 3, 0, '', 'Yes|No'],
Cam => [11, 'alpha', 0, 3, 1, '', 'Yes|No'],
Read_Rules => [12, 'alpha', 0, 15, 1, '', 'Yes|No'],
Agree => [13, 'alpha', 0, 15, 1, '', 'Agree|Disagree'],
Userid => [14, 'alpha', -2, 15, 0, '', ''],
Verified => [15, 'alpha', 0, 15, 0, 'NO', ''],
Verified_By => [16, 'alpha', -2, 40, 0, '', ''],
Warnings => [17, 'alpha', -2, 15, 0, '', '1|2|3'],
Comments => [18, 'alpha', '40x3', 255, 0, '', ''],
Admins => [19, 'alpha', 12, 15, 0, '', '']
);

is how I have it setup. Do you see any obvious errors?

Thanks

Ziggy
Quote Reply
Re: Back again!! =) In reply to
Hi,

From what I know you left something out.

Instead of this:
Code:
Subscribe => [10, 'alpha', 0, 3, 0, '', 'Yes|No'],

You should have this:
Code:
Subscribe => [10, 'alpha', 0, 3, 0, 'No', 'Yes|No'],

Hope this helps

------------------
Thanks
JFrost

Quote Reply
Re: Back again!! =) In reply to
Are you talking about the "Verified" field?
If so, you have to be sure the default value is exactly the same as the possible options. I notice that in your .cfg you have "NO," but in our discussion and in your other radio fields you have talked about it being set to "No." Case counts!!!!!


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