Support » Fixing WordPress » Multiple Metabox Save Options

  • In my plugin, I have five metaboxes with different option sets. I’m trying to wrap each metabox option set in a form, which when updated, does not interfere with the other option sets.

    (ALL options are saved as single array in wp_options table)

    Here are two basic functions (each one used in it’s own metabox):

    function jwl_buttons_group_1($data) {
       <form action="options.php" method="post" name="jwl_main_options1">
       <?php
       do_settings_sections('ultimate-tinymce1');
       settings_fields('jwl_options_group');
       ?>
       </form>
    }
    function jwl_buttons_group_2($data) {
       <form action="options.php" method="post" name="jwl_main_options2">
       <?php
       do_settings_sections('ultimate-tinymce2');
       settings_fields('jwl_options_group');
       ?>
       </form>
    }

    The problem is when I update buttons group one, it wipes out buttons group two’s options (if any were set).

    Any ideas?

  • The topic ‘Multiple Metabox Save Options’ is closed to new replies.