Solved

CFUPDATE - managing 'confirm value'

Posted on 2007-11-22
2
149 Views
Last Modified: 2013-12-24
I have the attached  two form entries to ensure that the user submits a correct email address during a database update. The value of the  variable in the databases is email - and i have a text entry in the form for email. I have also included a email2 text field for the user to retype his email address - for form checking.

The form checking works fine, no problem. However, when I run the update action page cfupdate will not handle the email2 variable as, of course it does exist in the table.

Is there a way to 'delete' the fom.email2 variable and value at the top of the actionpage, so the cfupdate tag just does not get to see it. Or is there another way around it.  I would rather not change my
form checking approach.

many thanks for any help,

james


<div id="Layer2" style="position:absolute; left:261px; top:201px; width:144px; height:23px; z-index:2">

            <input tabindex="3" name= "Email" type="text" id="Email" maxlength=50 value = <cfoutput>#registration_updte.Email#</cfoutput>>

          </div>
 
 
 

          <div id="Layer3" style="position:absolute; left:261px; top:247px; width:145px; height:23px; z-index:3">

            <input tabindex="4" name="Email2" type="text" id="Email2" maxlength=50  value = <cfoutput>#registration_updte.Email#</cfoutput>>

          </div>

Open in new window

0
Comment
Question by:jameskane
2 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 20336242
You can use the "formfields" attribute to exclude Email2.  In other words, list all of the form field names _except_ Email2.

<cfupdate
           formFields = "Email,OtherFormFieldA,OtherFormFieldB"
        datasource="YourDatasource"
        tableName="YourTableName"
      ...  >

Assuming you don't need Email2 for anything else, another option is to delete Email2 from the FORM structure before the <cfupdate>

<cfset StructDelete(FORM, "Email2")>
0
 

Author Comment

by:jameskane
ID: 20337953
Many thanks,

that did the trick

nice bit of learning for me as well
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JVM encoding. How to change encoding. 27 84
CFFILE upload help 98 138
Change local server setting in php 6 81
.dwt files not viewable in browser - why? 2 74
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now