This concept always eludes me.
I have a form on which the the fields are dynamically created. All three of the form fields below will have different values for each instance of the loop.
Like this:
Now, on the action page, I need to know the values of the two hidden fields total_monthly & total_one_time...but ONLY the values that are part of the same loop row of whichever radio button is selected. As things are now, when submitted, all values are passed.
My code looks like this:
...but it just sends the whole comma delimited list of field values.
How can I evaluate the list of submitted field values to only use the one I need? Or better yet, what is the best way to handle this?
Please help, I've been staring at this for 2 hours!
I have a form on which the the fields are dynamically created. All three of the form fields below will have different values for each instance of the loop.
Like this:
Code:
<form name="frm_page" method="post" action="page_5.cfm">
<cfloop query="get_config_options">
<input type="radio" name="config_opt" value="#get_config_options.config_id#" />
<input type="hidden" name="total_monthly" value="#total_monthly_fee#" />
<input type="hidden" name="total_one_time" value="#total_one_time_fee#" />
</cfloop>
Now, on the action page, I need to know the values of the two hidden fields total_monthly & total_one_time...but ONLY the values that are part of the same loop row of whichever radio button is selected. As things are now, when submitted, all values are passed.
My code looks like this:
Code:
<cfif isDefined('form.total_monthly')><cfset page.total_monthly = form.total_monthly></cfif>
<cfif isDefined('form.total_one_time')><cfset page.total_one_time = form.total_one_time></cfif>
How can I evaluate the list of submitted field values to only use the one I need? Or better yet, what is the best way to handle this?
Please help, I've been staring at this for 2 hours!