Note that there are some explanatory texts on larger screens.

plurals
  1. POTinyMCE Value Returns NULL/ no value on the first submit
    text
    copied!<p>I'm new in the <code>TinyMCE</code>...and I'm still wondering about this problem</p> <p>I have form which loaded dynamically from 1 page. And the form has tinyMCE textarea on it. And on the first submit after I put some values on the text area, the value of the textarea is not received by <code>$_REQUEST['Sub-Headline']</code>. I have to click the submit button again, and sometimes I need to re-open the form in order for the value to be received by <code>$_REQUEST['Sub-Headline'];</code></p> <p>Can you guys suggest me what I need to check and what options/other things that I should add?</p> <p>Here is part of code of the form :</p> <p><strong>TinyMCE</strong></p> <pre><code>&lt;script type="text/javascript"&gt; tinyMCE.init({ mode : "textareas", theme : "advanced", theme_advanced_buttons1 : "bold,italic,underline,strikethrough,undo,redo", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", convert_urls : false, plugins : "legacyoutput" }); &lt;/script&gt; </code></pre> <p><strong>FORM</strong></p> <pre><code> &lt;form action="web-block/forms/process-001.php" id="Frm001" method="post" class="general-form" enctype="multipart/form-data"&gt; &lt;div class="input-wrap"&gt; &lt;input class="clearme" name="Headline" value="&lt;?php echo $Headline;?&gt;" id="headline"/&gt; &lt;/div&gt; &lt;div class="input-wrap"&gt; &lt;textarea class="clearme" name="Sub-Headline" id="subheadline"&gt;&lt;?php echo $SubHeadline;?&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;label&gt;Main Image&lt;/label&gt; &lt;div class="up-mask"&gt; &lt;span class="file-wrapper"&gt; &lt;input type="file" name="pics" class="photo" id="pics" /&gt; &lt;span class="button"&gt; &lt;span class="default-txt"&gt;Upload Photo (Max Size 300Kb, 960x567 pixels)&lt;/span&gt; &lt;/span&gt; &lt;/span&gt; &lt;/div&gt;&lt;!-- .up-mask --&gt; &lt;input type="hidden" name="Key" id="Key" value="&lt;?php echo urlencode($Key);?&gt;"/&gt; &lt;input type="submit" class="submit-btn" value="Save" /&gt; &lt;a href="#" id="reset"&gt;Reset&lt;/a&gt; &lt;span class="save-notice"&gt;&lt;/span&gt; &lt;/form&gt; </code></pre> <p><strong>SUBMIT CODE</strong></p> <pre><code>$(document).ready(function() { var options = { beforeSubmit: function() { alert("kuntul"); tinyMCE.triggerSave(); }, success: function() { $('span.save-notice').text('Save Changed Successfully'); $('span.save-notice').show(2000); $('span.save-notice').hide(2000); } }; $('#Frm001').submit(function() { $(this).ajaxSubmit(options); return false; }); }); &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload