here is a good method to add defaults for a form to the page you are posting to.
NOTE: remember to remove the (name="submit") from your submit button.
This way it will not be included in the form.fieldnames list. Another bug I
have found is you cant name the form fields numeric as in
For some reason coldfusion gets confused when trying to evaluate it and simply
returns the field name and not the value.
if you wish to get the value of the field use the evaluate function as so:
#evaluate("#i#")#
I use this method to insert into DB's without all the coding. Providing your
column names are the same as your form fields.
field name: #i# value: #evaluate("#i#")#
>>> How do I get passed the "q1 is not defined in Form" CF error? All I want
>to
>
>Actually, you'd never want to have to deal with "not defined" errors in your
>core code. That's what is for, all form fields should be defined
>(default them to "" if needed) higher up, along with form field validation,
>and so on.
>
>--- Ben
>
>
>
>Write a code generator for it.
>
>
>fill out the form, and loop over the #Form.FIELDNAMES#
>
>Like so
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>> Is that the only way?
>>
>> It's a questionnaire form with 50 questions! You mean I have to do a
>
>later
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314505
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4