Gossamer Forum
Home : Products : Gossamer Links : Discussions :

New Column with Radio Buttons. Need Help?

Quote Reply
New Column with Radio Buttons. Need Help?
I have created a new column called Emp_Type with two options..."Permanent and Contract".

For some reason when I try to add a link and select Contract, I get the following message....

Emp_Type can not contain the value 'Contract'

When I set up the new column, I added:

Emp_Type ENUM(Permanent, Contract ) Yes Permanent Emp_Type RADIO

Anybody have a clue why the system is not recognizing "Contract" as an option? If I choose Permanent it works fine.
Quote Reply
Re: [yobo] New Column with Radio Buttons. Need Help? In reply to
Hello Yobo,

Try this, I normally use Yes/No options, but I have changed based on your post (please test it)

Use the code in include_form.html page where required.

Quote:

Permanent <input type="radio" value="Permanent" name="Emp_Type" <%if Emp_Type eq 'Permanent'%> checked<%endif%>>&nbsp; |&nbsp;
Contract <input type="radio" value="Contract" name="Emp_Type" <%if Emp_Type eq 'Contract'%> checked<%endif%>>



Hope this helps.

Vishal

Vishal
-------------------------------------------------------

Last edited by:

SWDevil.Com: Dec 6, 2005, 12:25 PM
Quote Reply
Re: [SWDevil.Com] New Column with Radio Buttons. Need Help? In reply to
Thanks for the immediate response.

Still getting the following message when trying to add a link....


Emp_Type can not contain the value 'Contract'

Any other ideas?
Quote Reply
Re: [yobo] New Column with Radio Buttons. Need Help? In reply to
Could it be to do with the regex for that column stored in the def file?
Quote Reply
Re: [Hargreaves] New Column with Radio Buttons. Need Help? In reply to
I have not a clue about what that is. I'm just trying add a two option radio button...

Either Permanent or Contract. It accepts Permanent but doesn't accept Contract.

Any other thoughts. Thanks in advance.
Quote Reply
Re: [yobo] New Column with Radio Buttons. Need Help? In reply to
When you add a new column you can supply a regex for validating data before it gets stored in the database. It sounds like the regex check is failing. In the table editor (in the admin panel) click on your new column name and take a look at the regex.
Quote Reply
Re: [Hargreaves] New Column with Radio Buttons. Need Help? In reply to
I left that field blank. Have not included any statements in the field.
Quote Reply
Re: [yobo] New Column with Radio Buttons. Need Help? In reply to
Try adding:

Code:
^\w+$

I'm not sure why one entry would be accepted and not another though.
Quote Reply
Re: [Hargreaves] New Column with Radio Buttons. Need Help? In reply to
Doesn't help. Still getting same message.
Quote Reply
Re: [yobo] New Column with Radio Buttons. Need Help? In reply to
Can you trace that error message in the language file to find its name and then see where it is being called in the source files?

Last edited by:

Hargreaves: Dec 6, 2005, 1:26 PM
Post deleted by yobo In reply to
Quote Reply
Re: [yobo] New Column with Radio Buttons. Need Help? In reply to
Figured out the problem. Seems like I had an extra carriage return in the values field. Something you can't see withthe naked eye. Working fine now. Thanks guys for your help.