Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old June 27th, 2008, 01:46 PM
Newbie
 
Join Date: Mar 2008
Posts: 2
Default How To Create Sticky Forms

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!
Reply
  #2  
Old June 27th, 2008, 03:04 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,963
Default

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.
Reply
  #3  
Old August 15th, 2008, 02:46 PM
Newbie
 
Join Date: Mar 2008
Posts: 2
Default

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!
Reply
  #4  
Old August 15th, 2008, 03:07 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,963
Default

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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 204,687 network members.
Post your question now . . .
It's fast and it's free

Popular Articles