Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6155657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:28:22+00:00 2026-05-23T20:28:22+00:00

I am dealing with form data with about 30 instances of these sets of

  • 0

I am dealing with form data with about 30 instances of these sets of 4 fields (each of different names & function). Is there a way to make this more manageable?

<!--- Lifeguard Instructor --->
<!--- Is the date defined? --->
<cfif len(Trim(form.lifeguardInstrcutorExp)) EQ 0>
    <cfinvokeargument name="lifeguardInstrcutorExp" 
        value="#defaultDate#">
<cfelse>
    <cfinvokeargument name="lifeguardInstrcutorExp" 
        value="#CreateODBCDate(Form.lifeguardInstrcutorExp)#">
</cfif>
<!--- Is a Company defined? --->
<cfif len(Trim(form.lifeguardInstrcutorCompany)) EQ 0>
    <cfinvokeargument name="lifeguardInstrcutorCompany" value="">
<cfelse>
    <cfinvokeargument name="lifeguardInstrcutorCompany" 
        value="#Trim(Form.lifeguardInstrcutorCompany)#">
</cfif>
<!--- Has a file been specificed? --->
<cfif not len(Trim(form.lifeguardInstrcutorImage)) EQ 0>
    <cffile action="upload" accept="#defaultFileAccepted#" 
        filefield="lifeguardInstrcutorImage" 
        destination="#destination#" 
        nameConflict="makeUnique">
    <cfinvokeargument name="lifeguardInstrcutorImage" 
        value="#pathOfFile##cffile.serverFile#">
<cfelse>
</cfif>
<!--- Do We have a hard copy? --->
<cfinvokeargument name="lifeguardInstrcutorOnFile" 
    value="#Trim(form.lifeguardInstrcutorOnFile)#">
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:28:22+00:00Added an answer on May 23, 2026 at 8:28 pm

    I would have the function you are invoking have arguments with default parameters, and then pass the form as the argument collection.

    Function:

    <cffunction name="myFunctionUsingForm">
            <cfargument name"lifeguardInstructorExp" type="string" default="#defaultDate#" />
            <cfargument name"lifeguardInstrcutorCompany" type="string" default="" />
            <cfargument name"lifeguardInstrcutorImage" type="any" default="" />
            <cfargument name"lifeguardInstrcutorOnFile" type="boolean" default="false" />
    

    Invocation:

    <cfset myFunctionUsingForm(argumentCollection=form) />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm dealing with data input in the form of json documents. These documents need
I'm having a very hard time dealing with multipart/form-data requests with my java application
Is there any way (apart form actual perfomance measurements which can be pretty hard
There are many frameworks that will provide a helper object for dealing with these
Is there a certain or special of dealing with hidden fields in jQuery? I
When dealing with sizeable algebraic data types in Haskell, there is a particular recursive
I am dealing with some hierarchical data in the following form: Level Parent PrimaryKey
I have a form which has about 40 fields.What are the effective patterns to
When dealing with a collection of key/value pairs is there any difference between using
I am using excel to keep track of certain data in the following form:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.