That is not a very good database design for future
development.
But to do what you want, if I understand your question
correctly, you do
not need to create a hidden form field.
I can imagine two possible solutions on the action page. If
you really
want it to be a form value for some reason. This should work:
<cfset form[form.role] = true> <!--- OR whatever
value you want this
field to be. --->
OR if you are writing your own queries, you should be able to
just do this.
<cfquery ....>
INSERT INTO aTable
(firstName, lastName, #form.role#)
VALUES
('#form.firstName#, #form.lastName#, true)
</cfquery>
Mikelaskowski wrote:
> Hi,
> I am trying to build a simple form which includes 3
fields:
> 2 Text fileds: FirstName, LastName, and 1 secet field:
Role
>
> I am looking to accomplish 2 things:
>
> 1. I want the form to take the data from the firstname
and last name fields
> and create a hidden field where the name of the the
hiddden fields is named
> after the selected Role.
>
> FYI, In my database I do not have a field called "role"
but i do have a field
> for every item in the role.
>
> Any ideas or same code to share?
> All help is greatly appreciated.
> Thanks!
>