This content has been marked as final.
Show 21 replies
-
1. Re: Radio Button not posting info to table
jjonney Sep 10, 2007 12:05 PM (in response to DaQuilter)Please fix the following and run your code
<tr>
<td><input type="radio" name="cclselect#currentrow#" value="Yes"></td>
<td><input type="radio" name="cclselect#currentrow#" value="No"></td>
<td> <input type="radio" name="cclselect#currentrow#" value="N/A"
<cfif #ccdirect# is "NO" and #cklstdirflg# is "YES"> checked</cfif>></td>
<td class="maroon12b"> #cklstdirflg#</td>
<td class="maroon12b"> #cklstapply#</td>
<td class="maroon12b"> #cklstnum#</td>
<td class="maroon12b"> #cklstdesc#</td>
</tr>
-
2. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 5:53 AM (in response to jjonney)Thanks so much...it's always the little things.
But now I'm getting an error that the value is too large for cclselect (actual 11, maximum 10). That field size is 10 but I don't see where's it's coming up with a value of 11 when the entry will be Yes, No or N/A. Any ideas? -
3. Re: Radio Button not posting info to table
jjonney Sep 11, 2007 7:21 AM (in response to DaQuilter)You are welcome
Please copy,cut and past the error with more description as I am not able to follow.
And also what is the value of "cclselect#currentrow#" " -
4. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 7:43 AM (in response to jjonney)I figured out part of my problem.. but now I'm getting "Element CCLSELECT is undefined in FORM". "cclselect#currentrow# is a Yes, No, N/A user input and I've added the #currentrow# so that specific rows that meet a certain criteria will have N/A already chosen for the user. I've reattached the code. Thanks! -
5. Re: Radio Button not posting info to table
jjonney Sep 11, 2007 7:58 AM (in response to DaQuilter)Add <cfparam> at the top
<cfparam name="cclselect" default="">
the value for default could be according to the program requirement.
Let me know -
6. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 8:13 AM (in response to jjonney)I tried many variations of the cfparam and continue to get Element cclselect is undefined in form. -
7. Re: Radio Button not posting info to table
jjonney Sep 11, 2007 8:37 AM (in response to DaQuilter)Do you have another query named "get Element".
Please send the error message as it appears.
Thanks -
8. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 8:44 AM (in response to jjonney)No, I do not have another query named "getElement". This is the exact error verbiage:
Diagnostics:
Element CCLSELECT is undefined in FORM.
The error occurred on line 79. -
9. Re: Radio Button not posting info to table
jjonney Sep 11, 2007 8:54 AM (in response to DaQuilter)Is line 79 on the CF page ,the following
'#form.cclselect#currentrow##', -
10. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 8:56 AM (in response to DaQuilter)yes -
11. Re: Radio Button not posting info to table
jjonney Sep 11, 2007 8:57 AM (in response to DaQuilter)The # sign cannot be nested
'#form.cclselect##currentrow#',
try the above -
12. Re: Radio Button not posting info to table
cf_dev2 Sep 11, 2007 9:04 AM (in response to DaQuilter)jjonney wrote:
> '#form.cclselect##currentrow#',
You need to use array notation to retrieve the form field value.
#form["cclselect"& yourIndex ]# -
13. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 10:14 AM (in response to cf_dev2)I'm sorry, I don't understand what I would use as the index part of the statement. -
14. Re: Radio Button not posting info to table
cf_dev2 Sep 11, 2007 10:30 AM (in response to DaQuilter)If you're inserting multiple rows, your action page would contain a loop. Use your loop's index variable name. For example
<cfloop from="1" to="#someNumber#" index="yourIndex">
<cfset currentCCSelectValue = form["cclselect"& yourIndex ]>
....
</cfloop>
Btw, this code looks awfully familiar. Did you post something similar recently? -
15. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 10:53 AM (in response to DaQuilter)Thanks for the "lesson" - I'm still learning and really appreciate you'll taking time to answer questions. I will work with your information to see if I can get it working.
Yes, I posted code pertaining to the loop with radio buttons needing N/A selected if fields met certain criteria and got that part working great. Thanks!! -
16. Re: Radio Button not posting info to table
cf_dev2 Sep 11, 2007 11:04 AM (in response to DaQuilter)> #ucase(form.cclselect)#
I haven't looked over all of your code, but wanted to ask. You're not trying to insert a csv list of values like this "1,23,4,568,9" into a single column right? 'Cause that is a bad idea all around :)
> Yes, I posted code pertaining to the loop with radio buttons
Ah, ok. I thought seemed a bit familiar. -
17. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 11:20 AM (in response to DaQuilter)No. (Screen 1).The user inputs some data, from the criteria of that data a list is displayed (Screen 2) that has radio buttons to select yes, no and N/a. Then the next action (Screen 3) will display the list with their inputs so they can have the option to print. So I'm trying to loop through the list that is displayed on screen 2 so it will update the database and display screen 3. -
18. Re: Radio Button not posting info to table
DaQuilter Sep 11, 2007 11:46 AM (in response to DaQuilter)Okay, my cfloop has to be a query so that it can sort throught my if conditions and unless I'm missing something in my book resarch, I cannot put an index on a cfloop query. So how would I go about calling this loop in the update to the DB? -
19. Re: Radio Button not posting info to table
cf_dev2 Sep 11, 2007 1:53 PM (in response to DaQuilter)No, it doesn't have to be a query. You could use a from/to loop. Take your form. You could create a hidden field to store the number of records. When the form is submitted, use the form field value in your cfloop.
-
20. Re: Radio Button not posting info to table
DaQuilter Sep 12, 2007 11:02 AM (in response to cf_dev2)I've been working with the sample you sent and am now getting this error:
unique constraint (LOG_WEB.PK_CCCKLSTID) violated
The error occurred on line 91.
I've attached the portion of the code that we've been working on. Thanks! -
21. Re: Radio Button not posting info to table
cf_dev2 Sep 12, 2007 12:58 PM (in response to DaQuilter)> unique constraint (LOG_WEB.PK_CCCKLSTID) violated
That means the table has a constraint that doesn't allow duplicates on one of the values you're trying to insert. From the name its probably #variables.cccklstid#. Is the Log_web.cccklstid column the table's PK (primary key)? You cannot have duplicate primary keys.