Skip to main content
Participant
September 8, 2008
Question

Bind failes in cflayoutarea after form submit

  • September 8, 2008
  • 2 replies
  • 1469 views
In an edit user page I've got a seperate form inside a cflayoutarea displaying the comments about this user. In this form I have a cfselect and a cftextarea, when changing the selected item in the cfselect the cftextarea shows the comment. This all works fine untill I submit the form (when adding or updating a comment) the comment is saved and the form is replaced by the same form in a seperate .cfm. After submitting I get a javascript error and this is what the coldfusion Ajax logger has to say about it: error:bind: Bind failed, element not found: userCommentId

This is the form in the new page, I use the exact same form in the original user detail page.

<cfform action="#request.self#?event=#XFA.saveComments#" name="commentsForm">
<input type="hidden" name="userId" value="#attributes.userId#">
<fieldset>
<legend>Comments</legend>
<div class="fm-req"><cfselect query="userComments" name="userCommentId" selected="" value="userCommentId" display="dt_lastchanged" size="1"></cfselect></div>
<div class="fm-req"><cftextarea richtext="false" name="comment" bind="cfc:cfcs.users.getUserComment({userCommentId})" /></div>
<div id="fm-submit" class="fm-req">
<cfinput type="submit" name="submit" value="Save comment">
</div>
</fieldset>
</cfform>

Thanks for reading, hope to get some good insights!

Lauw
    This topic has been closed for replies.

    2 replies

    Participating Frequently
    October 12, 2008
    Thanks for the nice update. Its really very nice.

    Razi.
    Participating Frequently
    October 6, 2008
    i really like what you say about that.