php - custom meta box with submit button in wordpress -


i'm making custom meta box wordpress plugin, , have 2 inputs , 1 submit button in form action inside meta box. want submit button form's action only, instead of updating post such publish button.

here meta box form:

add_action( 'add_meta_boxes', 'cd_meta_box_add' ); function cd_meta_box_add(){ add_meta_box( 'my-meta-box-id', 'meta box title', 'cd_meta_box_cb', 'post', 'normal', 'high' );   }  function cd_meta_box_cb(){ ?>     <form method="post" id="myform" action="<?php echo plugins_url( '/proses.php', __file__ ); ?>">         <ul class="sorter">             <li><label for="pdf">url image:</label><input class="txt" name="pdf" size="50" type="text" value="" /></li>             <li><label for="title">title image:</label><input class="txt" name="title" size="50" type="text" value="" /></li>             <input class="button" type="submit" value="submit" />         <div id="loading" style="display:none;"><img src="<?php echo plugins_url( '/loading.gif', __file__ ); ?>" /></div>         </ul>     </form>         <div id="result" style="display:none;"></div> <?php } 

this in post editor, want myform action process.php clicking submit button. there way that? knew it's possible because out of post editor it's works fine.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -