Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textarea in a Dynamic Query

Status
Not open for further replies.

Alan2000

Technical User
Jan 16, 2003
6
US
I am trying to populate all the fields of a form by using a ColdFusion template to retrieve data from the database. I then want to be able to update the data and resubmit the updated data to the same database.

I can retrieve data from text fields using the <cfinput type=&quot;text&quot; name=&quot;field&quot; value=&quot;#FieldName#&quot;> tag, but I cannot retrieve data for a textarea. There is no equivalent value=&quot;#FieldName#&quot; for the textarea tag.

Can anyone tell me how I can retrieve textarea data so I can update these fields on my form? Thanks in advance for any help.
alan2000
 
Hi mate,

Not sure if I understand your question correctly, but if I do then you simply need to incude the output like this.

<textarea>#output#</textarea>

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Hi Wullie,
Thanks for the speedy reply.

I think I may have been going about this the wrong way. for the text fields (not textarea), I've been using, for example, the following line of code:

<td>Program Name:
<cfinput name=&quot;progname&quot; type=&quot;text&quot; size=&quot;25&quot; maxlength=&quot;35&quot; required=&quot;Yes&quot; value=&quot;#ProgramName#&quot;></td>

I tried to do the same thing with textarea, but obviously could not find an equivalent to the 'value' description.

My goal is to populate the form with data from the data base, allow users to change the contents of the form and re-submit the changed form to the database. This will require-- I think-- another cfm template that will be able to distinguish between a form being submitted for the first time and one that is being updated. I will use the 'insert' or 'update' tags respectively to accomplish the task.

Thanks again for you help. Sometimes it helps to have someone point out the simple solution.
Alan2000
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top