Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery submit will not submit using Wordpress' WP-user-frontend plugin
    text
    copied!<p>I am working on a WordPress project where my client has guest authors allowed to submit posts but are having trouble figuring out the Wordpress Admin section and, in particular, how to embed YouTube videos in their posts. I added the wp-user-frontend plug-in which allows posts from Wordpress' front end. I added a custom field to the form and I am trying to intercept the submission of the form to concatenate the two values before the form submits.</p> <p>I can alert the value of the textbox and the value of the textarea but when I try the concatenation, nothing happens.</p> <p>Any help is greatly appreciated on the jQuery code below:</p> <pre><code>&lt;script type="text/javascript"&gt; (function($){ $('#wpuf_new_post_form').submit( function(){ var value = $('#new-post-desc_ifr').contents().find('#tinymce').html(); var tube = $('#cf_YouTube').val(); var new_val = ''; if( $.trim(tube).length) { new_val += value; new_val += '&lt;br&gt;&lt;iframe width="560" height="315" src="http://www.youtube.com/embed/'; new_val += tube; new_val += '" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;'; $('#new-post-desc').val( new_val ); } // end if return true; }); })(jQuery); // END self-invoking anonymous function /*************************************************/ &lt;/script&gt; </code></pre> <p>I edited the code to eliminate my STUPID error and now the form posts but it still posts the contents of the textarea and ignores the video code. Any ideas on what else is wrong beside the dumb php error???</p>
 

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