You will need to use an Ajax function. Which requires javascript to send the form data to your php Ajax function which you can use to run update_post_meta();
Example:
Form Html:
<form>
<input id="meta" type ="text" name="2344" value="<?php echo esc_html( get_post_meta( 2344, '_your_key', true) ); ?>" />
</form>
Javascript:
jQuery(document).ready(function() {
jQuery("form").submit(function() {
var post_meta = jQuery("input name=[2344]").val();
var ID = jQuery(this).attr("name");
jQuery.ajax({
type: "POST",
url: ajaxurl,
data: {
action: "update_meta",
post_id: ID,
meta: post_meta,
},
success: function( data ) {
//do something
}
});
return false;
});
PHP function:
add_action( 'wp_ajax_update_meta', 'my_function' );
function my_function() {
$post_id = $_POST['post_id'];
$meta = $_POST['post_meta'];
update_post_meta( $post_id, '_your_key', $meta );
echo 'Meta Updated';
die();
}