Forum closed. New forum available at http://community.wymeditor.org/

Issues with WymEditor not saving data

Support forum for WYMeditor.

Issues with WymEditor not saving data

Postby Digital Spaghetti on Mon Jun 11, 2007 4:09 pm

Strange....I have a CakePHP app where I managed to get WymEditor to work. Now I am re-writing parts of it, it seems to have stopped working for me.

The problem seems to be that when I save my form, the textarea that the data is entered into is ignored by the form.

In my example below, if I have WymEditor off - it works, the (cut down) form looks like this:

Code: Select all
<form action="/admin/posts/edit/19" method="post" id="PostEditForm">      <fieldset id="main-content">
         <legend>Main Content</legend>
         <input type="hidden" id="PostId" value="19" name="data[Post][id]"/>         
                        <div class="input required">
                             <label for="PostTitle">Title</label>
                             <input type="text" id="PostTitle" value="Will This Work" maxlength="255" class="required" name="data[Post][title]"/>
                        </div>         
                        <div class="input required">
                            <label for="PostByline">Byline</label>
                            <input type="text" id="PostByline" value="I Don't Know" maxlength="255" class="required" name="data[Post][byline]"/>
                         </div>
         <div class="input">
                           <label for="PostBody">Body</label>
                           <textarea id="PostBody" class="wymeditor" rows="6" cols="30" name="data[Post][body]">This works, doesn't it?</textarea>
                        </div>
</fieldset>
</form>


Now, when I enable WymEditor, the textarea changes to:

Code: Select all
<div class="input">
    <label for="PostBody">Body</label>
    <textarea id="PostBody" class="wymeditor" rows="6" cols="30" name="data[Post][body]" style="display: none;">This works, doesn't it?</textarea>
    <div class="wym_box wym_skin_default">
        <div class="wym_area_top">
             <div class="wym_tools wym_section wym_buttons">
                    <h2>Tools</h2>
                    <ul>
                         <li class="wym_tools_strong"><a title="Strong" name="Bold" href="#">Strong</a></li>....
     </div>
     <div class="wym_iframe wym_section">
         <iframe onload="window.parent.WYM_INSTANCES[0].initIframe(this)" src="/js/wymeditor/iframe/default/wymiframe.html"/>
    </div>
    <div class="wym_status wym_section"> </div></div><div class="wym_area_bottom"/></div></div>


I've tried to cut it down as much as possible - but the point is, I can see the data there, and it loads up into the iFrame, but when I try save my post, it seems to be ignores and not put into the array of data I'm saving.

Any ideas?
Digital Spaghetti
 
Posts: 4
Joined: Fri Jun 08, 2007 9:49 am

Postby Digital Spaghetti on Mon Jun 11, 2007 4:35 pm

Worked it out....I hadn't put the class on the Submit button!

Works now!
Digital Spaghetti
 
Posts: 4
Joined: Fri Jun 08, 2007 9:49 am

Submitted data

Postby misterm on Thu Dec 27, 2007 1:48 pm

I had the same thing and did two posts on it.

More on submitted data here and here
misterm
 
Posts: 14
Joined: Thu May 17, 2007 5:17 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest