Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Display form data without blank fields. (Coldfusion)

New Here ,
Dec 04, 2006 Dec 04, 2006

Copy link to clipboard

Copied

I would like to display data that was enter into a form, but without the fields that were left blank. For example, if someone enters their info in address 1 but left address 2 blank, I want to display address 1 and then display the next completed form field if address 2 was left blank. I am writing this in Coldfusion.

What I am trying to do is allow clients to create and preview a preformatted business card online so we eliminate the back and forth proofing process. The design for each card is the same, but with variable information. Ex., Address 1, Address 2, Cell Phone 1, Cell Phone 2, etc. When fields are left blank I want to eliminate them from being displayed as blank spaces.

Thank you in advance.

Steve Miller
TOPICS
Server side applications

Views

330
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 04, 2006 Dec 04, 2006

Copy link to clipboard

Copied

Just wrap your preview in IF statements like this

<CFIF Form.Fieldname neq "">
#Form.Fieldname#
</cfif>

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"mcmcreate" <webforumsuser@macromedia.com> wrote in message
news:el18d4$4bl$1@forums.macromedia.com...
>I would like to display data that was enter into a form, but without the
>fields
> that were left blank. For example, if someone enters their info in address
> 1
> but left address 2 blank, I want to display address 1 and then display the
> next
> completed form field if address 2 was left blank. I am writing this in
> Coldfusion.
>
> What I am trying to do is allow clients to create and preview a
> preformatted
> business card online so we eliminate the back and forth proofing process.
> The
> design for each card is the same, but with variable information. Ex.,
> Address
> 1, Address 2, Cell Phone 1, Cell Phone 2, etc. When fields are left blank
> I
> want to eliminate them from being displayed as blank spaces.
>
> Thank you in advance.
>
> Steve Miller
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2006 Dec 05, 2006

Copy link to clipboard

Copied

Thank you Paul. That worked perfectly!

Steve Miller

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 05, 2006 Dec 05, 2006

Copy link to clipboard

Copied

LATEST
You might also want to TRIM(Form.Fieldname) first to make sure no spaces
were entered on the form.

<CFIF TRIM(Form.Fieldname) neq "">
#Form.Fieldname#
</cfif>

Doug

"Paul Whitham AdobeCommunityExpert" <design@valleybiz.net> wrote in message
news:el2dks$jo2$1@forums.macromedia.com...
> Just wrap your preview in IF statements like this
>
> <CFIF Form.Fieldname neq "">
> #Form.Fieldname#
> </cfif>
>
> --
> Paul Whitham
> Certified Dreamweaver MX2004 Professional
> Adobe Community Expert - Dreamweaver
>
> Valleybiz Internet Design
> www.valleybiz.net
>
> "mcmcreate" <webforumsuser@macromedia.com> wrote in message
> news:el18d4$4bl$1@forums.macromedia.com...
>>I would like to display data that was enter into a form, but without the
>>fields
>> that were left blank. For example, if someone enters their info in
>> address 1
>> but left address 2 blank, I want to display address 1 and then display
>> the next
>> completed form field if address 2 was left blank. I am writing this in
>> Coldfusion.
>>
>> What I am trying to do is allow clients to create and preview a
>> preformatted
>> business card online so we eliminate the back and forth proofing process.
>> The
>> design for each card is the same, but with variable information. Ex.,
>> Address
>> 1, Address 2, Cell Phone 1, Cell Phone 2, etc. When fields are left blank
>> I
>> want to eliminate them from being displayed as blank spaces.
>>
>> Thank you in advance.
>>
>> Steve Miller
>>
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines