I want to add a button to a metabox that when pressed, executes an AJAX script.
I can’t find anything on how to add an unattached button field.
Hi @dnavarrojr
Thanks for the question.
Kindly explain with more detail what you mean by an unattached button so that I can see how I may be of help.
I’d like to see this idea explored further.
Hi @photocurio
Thanks for chipping in.
Maybe you could offer more details on your desirable functionality so that I can compile a conclusive report for the plugin author.
Sorry, been been extremely busy at work.
This is probably more for an ACF addon that a feature, but in order to add code associated with any ACF field, you have to add it to FUNCTIONS.PHP or a custom plugin.
I’d really love to see an additional section for each field that allows me to plug my code right into each individual field’s settings.
So, I can stick some JS code that handles validation or loading data from an external source, or updating other fields in the metabox.
For example, I have an ACF form for handling basketball brackets. And I’d like to display an update to the bracket in an HTML field each time a game is added. Right now, you have to add the game, update, then view the bracket on a front end page. Very time consuming.
It would also be nice to attach PHP code to a field that is executed each time the field is updated. Again, I can write code in my custom plugin, but maintaining it all gets to be a hassle when it would be so much easier if it were right there as an added section for each field.
Hi @dnavarrojr,
Apologies for the delay, the forums are unmonitored by the developer.
To help us begin some work on this, please open a feature request at [email protected] and our friendly support team will get back to you ASAP 🙂