Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have alot of custom meta boxes, and the user has to scroll to the top everytime he wants to save the meta info.

Is there a way to put submit buttons at every meta box that does that same as the update button?

share|improve this question
add comment

2 Answers 2

up vote 6 down vote accepted

Don't know if i agree with EarnestoDev answer which is more of an opinion then an answer based on facts and not true in all cases, since you can use jQuery to trigger the submit event when a different element is clicked, so just add this js code once

<script>
jQuery('.metabox_submit').click(function(e) {
    e.preventDefault();
    jQuery('#publish').click();
});
</script>

and in each metabox add:

<input type="submit" class="metabox_submit" value="Submit" />
share|improve this answer
    
Works great Thanks! –  Talon May 7 '12 at 18:46
add comment

DON'T DO IT! There's reasons why FORMs have centralized submits. Because there's some processing done behind the screen and one button is safe. Having an extra button in all your Metaboxes will also take up more space.

The easier you make it for the user to press the button, the safer it is to bet he'll forget something. The more difficult it is to submit a post, the more sure you can be he'll review stuff properly.

One button = IMPORTANT. Many buttons = importance demotion.

share|improve this answer
2  
+1 and double that. If you need lots of fields, put them in one well thought meta box. –  kaiser Oct 29 '11 at 16:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.