Connecting Tech Pros Worldwide Help | Site Map

cfform - textarea submitting intermittently

Newbie
 
Join Date: May 2006
Posts: 1
#1: May 1 '06
Hi there! I'm new to ColdFusion so I hope my question makes sense...

I have created a blog using ColdFusion, but for some reason when the blog is submitted the blog text within the <textarea> field is not always submitting.

The form:
Expand|Select|Wrap|Line Numbers
  1. <cfform name="myblog" method="post" action="blogaction.cfm" enctype="multipart/form-data">
  2.       User Name:<br />
  3.       <cfinput type="text" name="userName" required="yes" message="Name Required" size="23"><br />
  4.       Subject:<br />
  5.       <cfinput type="text" name="blogTitle" required="yes" message="Subject Required" size="23">
  6.       <br />
  7.       <br />
  8.       Blog:<br />
  9.       <textarea name="blog" id="blog" required="yes" message="Blog Required" rows="5" class="blog1" wrap="virtual"></textarea>
  10.       <br /><br />
  11.       Image* (Optional)<br />
  12.       <input type="file" name="blogimagefile" class="file">
  13.       <br /><br /><br /><br />
  14.       <input type="reset" value="Reset" class="button1">
  15.       <input type="submit" value="Submit" class="button1">
  16.     </cfform>
  17.  
The Output:
[HTML]<table class="main" border="1" cellspacing="0" cellpadding="5">
<cfoutput query="myblog">
<tr>
<td class="user"><strong>ID: </strong>#username#</td>
<td class="subject" colspan="2"><strong>Subject: </strong>#blogTitle#</td>
</tr>
<tr>
<td class="date">#dateAppend#</td>
<td class="content">#blog#</td>
<td class="image"><cfif #blogimagefile# EQ "">[no image]
<cfelse>
<img src="images/#blogimagefile#" width="100" height="70"></cfif></td>
</tr>
<tr>
<td class="bar" colspan="3">&nbsp;</td>
</tr>
<tr>
</cfoutput>
</table>
[/HTML]
Hope someone can help!?
Thanks.
Familiar Sight
 
Join Date: Jan 2007
Posts: 168
#2: Feb 19 '07

re: cfform - textarea submitting intermittently


Try removing required="yes" message="Blog Required" from your <textarea> tag...

OR

Keep required="yes" message="Blog Required" after changing your <textarea> tag to <cftextarea>

Also,

Checkout all the submitted values through the <cfdump> tag
Reply