I’m trying to allow users to edit a <div>
using Jeditable.
I have the editable <div>
working fine, and all my Javascript options are set.
I’m simply running into trouble with my save script. I would like to simply update a custom field (the only element in the editable div).
In my save script, I know I should be using update_post_meta
but I’m having some issues getting it to work. Are there other variables I need to set up before calling update_post_meta
?
Save script is currently a simple:
$text = $_POST['editext'];
global $post;
$text = update_post_meta( $post->ID, '_cmb_editext_textarea' );
echo $text;