Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Dynamic form input name

$
0
0

Hi,

 

My brain is frozen or something because I couldn't think out this issue.  Basically my form input radio name and value are dynamically pulled from a database.  The name of the form is concat with a name and id is from a database.  On the form processing side, how would I get all the dynamic input radio name.  The value of the input will be attach to the name.  Hope that make sense. 

 

form.cfm

<cfquery name="get_form_name" datasource="#ds#">

     SELECT id, name

     FROM records

</cfquery>

<cfoutput>

<form action="form_process.cfm">

<cfloop query="get_form_name">

<p>name: <input type="radio" name="test_#get_form_name.id#" value="#get_form_name.name#" /></p>

</cfloop>

<input type="submit" value="submit">

</form>

</cfoutput>

 

form_process.cfm

somehow get all the input name from the FORM to set cfparam and value.  Once I have this, i have the form values that are passing over.


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>