Ian,
I know someone mentioned it already, but it's best to store each piece in a
separate field. Then, if you want to have the "fullname" when you query the
db, you can do something like this:

SELECT title || ' ' || forename || ' ' || surname AS fullname
FROM yourtable

(That's the oracle syntax. I think SQL server uses & instead of || to
concantenate...)

-Deanna

----- Original Message -----
From: "Ian Vaughan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, September 30, 2003 9:22 AM
Subject: Combining Form Fields ?


> I have three form fields that will make up a name, these are Title,
Forename and Surname.
>
> Is it possible to combine the contents of these three form fields so it is
entered into 1 database field.
>
> So basically is it possible for the form elements below to be entered as
'Mr Ian Vaughan' in the contactname database field ?
>
> <tr>
> <td width="15%" class="sectionSummary">Title</td>
> <td width="85%">
>
>  <select size="1" name="title">
> <option selected>Select a Title</option>
> <option value="Mr">Mr</option>
> <option value="Mrs">Mrs</option>
> <option value="Ms">Ms</option>
> <option value="Dr">Dr</option>
> <option value="Rev">Rev</option>
> </select></td>
> </tr>
>
> <tr>
> <td width="15%" class="sectionSummary">Forename</td>
> <td width="85%"><input name="forename" class=mini size="30"></td>
> </tr>
>
> <tr>
> <td width="15%" class="sectionSummary">Surname</td>
> <td width="85%"><input name="surname" class=mini size="30"></td>
> </tr>

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to