Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: How to you save form data on a form submitted to itself?

$
0
0

If you are submittiing the form to itself (to the same page that contains the form), then what I do typically is:

 

  1. Add <cfparam> tags at the top of the page to define defaults for the form fields, usually an empty string: <cfparam name="form.myField" default="">
  2. Put the form inside a <cfoutput> block.
  3. Put the default values into the form fields: <input id="myField" name="myField" type="text" value="#form.myField#">

 

Now the form will show the value that was submitted to it.  No hidden form fields required.

 

-Carl V.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>