Connecting Tech Pros Worldwide Help | Site Map

How To Create Sticky Forms

  #1  
Old June 27th, 2008, 01:46 PM
Newbie
 
Join Date: Mar 2008
Posts: 2
Hey Guys,

I have just started working on ColdFusion, so I am relatively new to it than most of you may be. I am trying to create 'Sticky Stay-Filled' forms so that when the form is submitted, the details entered on the form show up on the page following the submit. Just FYI, the form is submitted to itself. I have done this in PHP almost a hundred times but have never done it in CF.

Here's a link to what I am looking for:
http://www.webdeveloperny.com/form.php

Any help is really appreciated!

Thanks!
  #2  
Old June 27th, 2008, 03:04 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,526
Provided Answers: 12

re: How To Create Sticky Forms


What you need to do is take the inputs from the form, e.g. if POSTed, form.field, otherwise url.field (for GET), then for text input fields, set the value using Coldfusion to output it, e.g.
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="field" value="<cfoutput>#form.field#</cfoutput>">
For select elements, set the selected option if the values match. For radio/checkboxes, set the checked property for matching values.
  #3  
Old August 15th, 2008, 02:46 PM
Newbie
 
Join Date: Mar 2008
Posts: 2

re: How To Create Sticky Forms


Quote:
Originally Posted by acoder
What you need to do is take the inputs from the form, e.g. if POSTed, form.field, otherwise url.field (for GET), then for text input fields, set the value using Coldfusion to output it, e.g.
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="field" value="<cfoutput>#form.field#</cfoutput>">
For select elements, set the selected option if the values match. For radio/checkboxes, set the checked property for matching values.

Thanks for your reply, saved me some time googling for an answer!
  #4  
Old August 15th, 2008, 03:07 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,526
Provided Answers: 12

re: How To Create Sticky Forms


You're welcome. Glad it helped even if after some time ;)
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't see new customer in control barkarlo answers 5 February 19th, 2008 10:11 PM
Migrating away from MS-Access John answers 64 October 31st, 2007 12:45 AM
Updating a windows forms control from a thread DW answers 11 November 16th, 2005 05:48 PM
Python syntax in Lisp and Scheme mike420@ziplip.com answers 699 July 18th, 2005 05:41 AM