• I was hoping for your help with getting all metabox data/changes to save when the “save_post” hook fires in the admin. I want all metabox fields to save when you click “Preview Changes” from the admin. Is there something built into your Metabox plugin that would allow me to do this? I know I could use Ajax or maybe hack your RW_Meta_Box class, but neither of those seem like the best solution.

    Is there any built in functionality I could use to make the metabox data save when previewing in the admin? Or is there at least a way to make the changes reflect in the preview? Perhaps I have something setup improperly?

    Thank you ahead of time for your help.
    Shawn

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi Shawn,

    Have you tried the “autosave” functionality for meta box? It’s not exactly the same, but it still can save data and you can preview it.

    Thread Starter Shawn Hayes

    (@sharewebdesign)

    Thank you so much for getting back to me! I really appreciate the help.

    Your “autosave” functionality seems like it would be perfect. I can’t seem to get it to work on published posts though. I can see that the autosave.js is being loaded, but unless the status is “Draft” it doesn’t auto save along with the title and content. It also seems to work on drafts whether I have autosave = true or false, so I must be doing something wrong.

    Is this feature intended for published posts? Is there something I have to do besides adding 'autosave' => true, to my $meta_boxes array? Is there any documentation you could point me to on this feature?

    Thanks again for the help.
    Shawn

    Thread Starter Shawn Hayes

    (@sharewebdesign)

    Sorry for the duplicate

    • This reply was modified 8 years, 2 months ago by Shawn Hayes. Reason: Should have replied to Anh
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Save Metabox fields when save_post hook fires.’ is closed to new replies.