redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Add no_ajax argument to fields

Open dovy opened this issue 11 years ago • 2 comments

Potential feature. When ajax_save is set to false for a given FIELD (and possibly section), the panel will reload on save.

Small feature, lots of use cases.

dovy avatar Jul 28 '15 17:07 dovy

I second this! What crazy timing, I literally just thought of this and then I stumble upon your post. Haha ;P Great idea!

paulthecoder avatar Jul 28 '15 19:07 paulthecoder

Okay, for the record, kiddies, I added something similar a few months back, and it worked for a minute (because someone wiped out the code that made it work in the ajax_save function). Anyways, I added it back in, but here is how it works:

You'll need to add the argument ajax_save => false to the FIELD you want the panel to reload on, when that field's option has changed. This argument will only work when global ajax_save argument is set to true. Setting the field specific argument to true when the global ajax_save is set to false will do nothing, because activating the ajax_save functions on a per field basis when it's disabled is pointless, and will take more work than I'm willing to do, frankly. :P

So, there it is. Enjoy. It's available in v3.5.6.4 and up.

kprovance avatar Aug 05 '15 03:08 kprovance