Nevermind..I figured a workaround.

You wrap the #form.fieldname# in ''.
Or I suppose anything else would do..just so that it reads as not being
a completely empty string.

-Gel


-----Original Message-----
From: Angel Stewart [mailto:[EMAIL PROTECTED] 
Hey all! :)

I am writing a little .cfc that is supposed to cycle over formfields
passed to it in a argument called MyFormFields...

So of course...sometimes a form field can be empty. 

I have code that loops from 1 to ListLEn(MyFormFields).

But..if the form has 5 fields, and only 4 are filled out....then ListLen
becomes 4. 
And the list itself seems to ignore empty fields.

It's very...odd...because an empty field should still be a field..only
empty.

Here's the CFINVOKE tag:
<cfinvoke 
 COMPONENT="EmailSender"
 METHOD="SendMyEmail"
 RETURNVARIABLE="SendMyEmailRet">
        <cfinvokeargument NAME="MyFormfields"
VALUE="#Form.name#,#form.address#,#form.city#,#form.zip#,#form.telnumber
#,#form.email_addr#,#form.district#,#form.r1#"/>
        <cfinvokeargument NAME="MyFieldCaptions"
VALUE="Name,Address,City,Zip Code,Telephone
Number,Email,District,Approval"/>
        <cfinvokeargument NAME="EmailAddress"
VALUE="[EMAIL PROTECTED]"/>
        <cfinvokeargument NAME="MySubject" VALUE="Caddo Parish 2003
Capital Outlay Projects Opinion Form"/>
        <cfinvokeargument NAME="WhoFrom" VALUE="#form.email_Addr#"/>
        <cfinvokeargument NAME="MyHeader" VALUE="Response from Caddo.org
Capital Outlay Projects Opinion Form."/>
        <cfinvokeargument NAME="MyFooter"
VALUE="-------------------------------------------------"/>
</cfinvoke>

The Captions are supposed to match the Fields themselves of course. 

How do I make those 'empty' fields count as elements in the list???

-Gel


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
                                

Reply via email to