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

Form variable rebuilt, data missing?

Engaged ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

Ok, so I understand th structCopy vs duplicate. I now have a action template that processes a FORM variable form a post. The form variable is intact until the template runs a custom tag. at the line following the CT the FORM variable is different and has limited data. Actually the data is only the "visible" fields from the form? The CT is just a simple set of scripts that takes the form data and puts it in the database for latter retrieval. All hidden fields & the fieldNames field are gone? So what is causing these once stable variables to fall apart like this? Is there anyway to lock them down to keep them intact?

Views

527

Translate

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

correct answers 1 Correct answer

Valorous Hero , Dec 03, 2010 Dec 03, 2010

ilssac wrote:

csgaraglino wrote:

<cf_icwsForm2db

     action="store"

     formData="#form#"

     emailTo="#evaluate(icwsUserEmail)#"

     storeEmailLists="#icwsEmailLists2db#"

     verificationID="#verificationID#"

     verificationVAR="#verificationVAR#">

Sorry I didn't note this earlier.  But the quick simple fix to make it work like is sounds like it was working on the CF5 system, would be to apply the same lesson from your other post.

<cf_icwsForm2db

     action="store"

     formData="#duplicate(form)#

...

Votes

Translate

Translate
Valorous Hero ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

That shouldn't be happening and I've never experienced anything like it.

My only idea is that something inside the custom tag is modifying the forum structure while it is processing.  But since I have no idea about what is going on in the custom tag, I can't do more than just speculate.

Votes

Translate

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
Engaged ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

I searched it hard and could not find anything in there?

Before:

<cf_icwsForm2db

     action="store"

     formData="#form#"

     emailTo="#evaluate(icwsUserEmail)#"

     storeEmailLists="#icwsEmailLists2db#"

     verificationID="#verificationID#"

     verificationVAR="#verificationVAR#">

Here is my work-around:

<cfset myFormData = duplicate(form)>
<cf_icwsForm2db

     action="store"

     formData="#myFormData#"

     emailTo="#evaluate(icwsUserEmail)#"

     storeEmailLists="#icwsEmailLists2db#"

     verificationID="#verificationID#"

     verificationVAR="#verificationVAR#">

T test this, I just dumped FORM before and after.

For my work-around, I did nothing to the CT code... Just created the new var and passed it...

Weird?

Votes

Translate

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
Valorous Hero ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

csgaraglino wrote:

<cf_icwsForm2db

     action="store"

     formData="#form#"

     emailTo="#evaluate(icwsUserEmail)#"

     storeEmailLists="#icwsEmailLists2db#"

     verificationID="#verificationID#"

     verificationVAR="#verificationVAR#">

That is the code that calls the custom tag.  It doesn't really tell one much about what the custom tag actually does.

It's what is going on in the icwsForm2db.cfm file that matters.  This could very well be another place the "pointer" versus "copy" is getting you.  Before Java, formData="#form#" was probably creating a copy.  Now it is creating a pointer, and as a pointer anything done to the data via the pointer is done to the original since they are one and the same data in the same location in memory.

Votes

Translate

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
Engaged ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

I'm nor familiar  with this system, can I attach the CT somewhere?

Votes

Translate

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
Valorous Hero ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

No, no method that I am aware of.

One of many complaints that many of us have about this "system"

Votes

Translate

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
Valorous Hero ,
Dec 03, 2010 Dec 03, 2010

Copy link to clipboard

Copied

ilssac wrote:

csgaraglino wrote:

<cf_icwsForm2db

     action="store"

     formData="#form#"

     emailTo="#evaluate(icwsUserEmail)#"

     storeEmailLists="#icwsEmailLists2db#"

     verificationID="#verificationID#"

     verificationVAR="#verificationVAR#">

Sorry I didn't note this earlier.  But the quick simple fix to make it work like is sounds like it was working on the CF5 system, would be to apply the same lesson from your other post.

<cf_icwsForm2db

     action="store"

     formData="#duplicate(form)#"

     emailTo="#evaluate(icwsUserEmail)#"

     storeEmailLists="#icwsEmailLists2db#"

     verificationID="#verificationID#"

     verificationVAR="#verificationVAR#">

Votes

Translate

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
Community Expert ,
Dec 04, 2010 Dec 04, 2010

Copy link to clipboard

Copied

LATEST

Ian nails it here. Without Duplicate, you are passing the form to the custom tag by reference rather than by value. When something is passed by reference, you really only have one thing, and multiple ways of accessing that thing. When you use Duplicate, you create a completely separate copy of that thing, and changing the duplicated value doesn't affect the original value.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

GSA Schedule, and provides the highest caliber vendor-authorized

instruction at our training centers, online, or onsite.

Read this before you post:

http://forums.adobe.com/thread/607238

Votes

Translate

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
Resources
Documentation