save options sections one by one
-
Hello
Hope I’m in the right area here.
I am coding a theme options page
after setting up some options (in array) for different theme options user can modify, I also added the proper validation and form to render those options
Thats all perfectly working
I the used this to save my options:
//the relevant "save" section of my code case "close": $i++; ?> <input name="save<?php echo $i; ?>" type="hidden" /> <?php submit_button() ?>//that button displays after each section </div><!--#section_body--> </div><!--#section_wrap--> <?php break; } } ?> <input type="hidden" name="action" value="save" /> <?php submit_button( 'Save All Options' ) ?>//after ALL sections </form> <form method="post"> <input type="hidden" name="action" value="reset" /> <div class="warning"> <?php echo _e('Warning! Next Step Resets ALL options!', 'minmax3'); ?>//After ALL sections </div> <?php submit_button( 'Reset All Options' ); ?> </form> <br/> </div><!--#options-wrap-->OK, now, I would like my “Save Button” to save only a section at once
=> let’s say section A has a button and section B too
If i now hit on save (doesn’t matter which one) ALL sections get savedthats cool for the last button that says “Save ALL Options”
But not for the button after each section that says “Save Changes” (default WP value)So now, do we have any API to follow here?
I couldn’t find any in this case.could anyone give me a example?
🙂
=> you know what would be very fancy?
the relevant section being shortly highlighted
(in whatever color)
once user saves one single section)
🙂 🙂I thank everybody who gives me a input here!
( i assume I must pass another variable in the save button, something like a “if” is section, save related section…) ??
The topic ‘save options sections one by one’ is closed to new replies.