My custom post type section is quite long, so I’ve broken it up into 7 “steps” with buttons added via jquery that take the user to the next “step” by hiding the first section and revealing the next.
How would I trigger the publish or update button click when clicking on the “next step” button?
I’ve tried several solutions – none seem to be working.
The “step button” code:
jQuery('#button-1').live('click',function(){
jQuery('#acf_89').show();
jQuery('#acf_88').hide();
});
To trigger a button click event you can call .click()
The problem with triggering a click on the “Update” button is that you will reload the page and lose your position in your custom walk-through wizard.
To save the post on the fly you will need to augment your WordPress install with something like Ajax Post Save