Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
jen_ren #1
Help with dynamic output using Form.variable
Well here is my situation:
Survey answers insert into access db. Working fine.
Viewing the results:
I have a form that you can choose by who enter it and what answer to a
question you want to view.
My is, I think working fine. Its the output list that is not, all I get is
variable name the amount of times it is in the db instead of getting the
answers to the question.
So, when #Form.question# = FA1 3 times in the answers table. My output is,
minus the <hr> :
FA1
FA1
FA1
What am I not understanding here?
Here is the query:
<cfquery name="yourView" datasource="development">
SELECT '#Form.question#' FROM answers WHERE staffTitle = ('#Form.position#')
</cfquery>
Here is what I am trying to use to get my output:
<cfoutput query="yourview">
<td width="715" class="bullets">
<p>#Form.question#<br></p>
<hr align="left" width="50%" size="1" noshade>
</cfoutput>
jen_ren Guest
-
Passing Dynamic Variable In A Hidden Form
Hello: I am trying to pass a hidden variable from a form on my web application to the PayPal site for payment processing. I can get my code to... -
dynamic variable name and output problem
Hey all, I having trouble with dynamically naming a variable and then outputting the value. If I hard code the output blick below to #scoreAvg#, it... -
Reading dynamic FORM variable value
I am receiving the following error: Element cb_2 is undefined in a Java object of type class coldfusion.filter.FormScope referenced as The Error... -
output variable to txt file
I made a flash program that finds prime numbers. These prime numbers are put into a string which gets longer and longer vPrimeString =... -
Can't output a variable to HTML
I have this code on a page: <p class="appTitle"> <?php echo "$appTitle"; ?> </p> But the resulting HTML is: <p class="appTitle"> </p> -
dempster #2
Re: Help with dynamic output using Form.variable
It looks like you have a couple of mistakes in your code. To use the form
input to specify a field name in the select, don't use quotes. You just want CF
to substitute the value into the SQL statement (such as SELECT FA1 and not
SELECT 'FA1' ). In your output, you are specifying the text value of the form
field, not the database field with that name. If you use AS in your SQL to give
the field name an alias, this will be easier.
<cfquery name="yourView" datasource="development">
SELECT #Form.question# AS question FROM answers WHERE staffTitle =
('#Form.position#')
</cfquery>
<cfoutput query="yourview">
#question#<br>
</cfoutput>
dempster Guest
-
jen_ren #3
Re: Help with dynamic output using Form.variable
Thanks for helping me see that. It works perfectly now.
Feel like I belong in duhhhhhville!!!! HAHAHAHa
Have a great day:D:brokenheart;
jen_ren Guest



Reply With Quote

