how to youtube api data to print in toolset metabox using a button click before save-post
PHP Snippet 1:
<script>
jQuery('.Import').live('click', function(e) {
e.preventDefault();
jQuery('#save').click();
});
</script>
PHP Snippet 2:
$ytURL = get_post_meta(get_the_ID(), 'wpcf-song-av', true);
PHP Snippet 3:
$ytURL = $_POST['ytext'];
PHP Snippet 4:
<input id="textbox_id" name="ytext" placeholder="YT ID here" type="text" />
<input type="submit" name="Import" class="Import" id="Import" />