0
dynamic drop down based on user selection
Participant
,
/t5/dreamweaver-discussions/dynamic-drop-down-based-on-user-selection/td-p/999345
Sep 08, 2006
Sep 08, 2006
Copy link to clipboard
Copied
hi all, ok, I have a table which contains use data, a name,
and a userID. for the example lets say "Simon Bullen" and my userID
is "999".
on a form I have, there is a dropdown box, which is dynamic from this table, and allows me to select Simon Bullen, however, I have a hidden field on the form, which when the user selects "simon bullen" the hidden field populates with the appropiate U number from the same table.... no i thought this would do it:
<cfquery name="userNumber" datasource="userList">
SELECT userNumber FROM dbo.Users WHERE Name =
<cfqueryparam value="#form.Name#">
</cfquery>
and then my dynamic form field (hidden) would reference to this query....
but it doens't work, could somebody please enlighten me? I'm hoping its something silly
Thanks in advance
on a form I have, there is a dropdown box, which is dynamic from this table, and allows me to select Simon Bullen, however, I have a hidden field on the form, which when the user selects "simon bullen" the hidden field populates with the appropiate U number from the same table.... no i thought this would do it:
<cfquery name="userNumber" datasource="userList">
SELECT userNumber FROM dbo.Users WHERE Name =
<cfqueryparam value="#form.Name#">
</cfquery>
and then my dynamic form field (hidden) would reference to this query....
but it doens't work, could somebody please enlighten me? I'm hoping its something silly
Thanks in advance
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Simonbullen
AUTHOR
Participant
,
/t5/dreamweaver-discussions/dynamic-drop-down-based-on-user-selection/m-p/999346#M149114
Sep 08, 2006
Sep 08, 2006
Copy link to clipboard
Copied
Sorry forgot to say, am using DM8, SQL and CF7
thanks
thanks
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/dynamic-drop-down-based-on-user-selection/m-p/999347#M149115
Sep 10, 2006
Sep 10, 2006
Copy link to clipboard
Copied
Is there a particular reason why you want to set the dropdown
value to
another field rather than referencing it directly.
--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"Simonbullen" <webforumsuser@macromedia.com> wrote in message
news:edrrik$feu$1@forums.macromedia.com...
> hi all, ok, I have a table which contains use data, a name, and a userID.
> for
> the example lets say "Simon Bullen" and my userID is "999".
> on a form I have, there is a dropdown box, which is dynamic from this
> table,
> and allows me to select Simon Bullen, however, I have a hidden field on
> the
> form, which when the user selects "simon bullen" the hidden field
> populates
> with the appropiate U number from the same table.... no i thought this
> would
> do it:
>
> <cfquery name="userNumber" datasource="userList">
> SELECT userNumber FROM dbo.Users WHERE Name =
> <cfqueryparam value="#form.Name#">
> </cfquery>
>
> and then my dynamic form field (hidden) would reference to this query....
>
> but it doens't work, could somebody please enlighten me? I'm hoping its
> something silly
>
> Thanks in advance
>
another field rather than referencing it directly.
--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"Simonbullen" <webforumsuser@macromedia.com> wrote in message
news:edrrik$feu$1@forums.macromedia.com...
> hi all, ok, I have a table which contains use data, a name, and a userID.
> for
> the example lets say "Simon Bullen" and my userID is "999".
> on a form I have, there is a dropdown box, which is dynamic from this
> table,
> and allows me to select Simon Bullen, however, I have a hidden field on
> the
> form, which when the user selects "simon bullen" the hidden field
> populates
> with the appropiate U number from the same table.... no i thought this
> would
> do it:
>
> <cfquery name="userNumber" datasource="userList">
> SELECT userNumber FROM dbo.Users WHERE Name =
> <cfqueryparam value="#form.Name#">
> </cfquery>
>
> and then my dynamic form field (hidden) would reference to this query....
>
> but it doens't work, could somebody please enlighten me? I'm hoping its
> something silly
>
> Thanks in advance
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Simonbullen
AUTHOR
Participant
,
LATEST
/t5/dreamweaver-discussions/dynamic-drop-down-based-on-user-selection/m-p/999348#M149116
Sep 11, 2006
Sep 11, 2006
Copy link to clipboard
Copied
Thanks for the reply, see what i'm trying to do is have the
user insert thier 'common name' and thier 'user number' as I need
both in the database. But i didn't want them to have to select
both, so I thought there might be a relativly easy way to
automatically select thier user number when they select thier
name....
do I make sense?
do I make sense?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

