Solved

CFUPDATE - managing 'confirm value'

Posted on 2007-11-22
2
148 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
Comment Utility
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
Comment Utility
Many thanks,

that did the trick

nice bit of learning for me as well
0

Featured Post

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Join & Write a Comment

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

11 Experts available now in Live!

Get 1:1 Help Now