There is an attribute called preserveData
in the cfform
that preserves the values of various controls after form submit.
Is there any attribute to get the same functionality in startFormTag()
in cfwheels.
If not, then, I think, cfwheels should include/add this functionality to the startFormTag()
.
This would be really helpful.
@pankaj preserveData functionality is not available in CFWheels startFormTag(), though you can do couple of things to perform same operation. if you want to populate data from databse in your html form then you can use findOne method to get the data from database and populate using form helpers( there are some form helper that accepts objects as a parameter and findOne return data in object format). if you want the normal data to be populated then declare it using cfparam and put it in value,checked,selected attribute of HTML From helpers function.
i.e
if you are fetching data from database then you can do some thing like this (i have "test" table and which has column "name")
and to populate it in form
for normal data you can declare it in cfparam
and to display it in form