Could someone explain me with a little example how create a button that creates a new custom field dynamically?
I’m working on a plugin and using add_meta_box
, I need an input box (administration-side) and a button that when clicked will create a new input box, after saving the previous data (on a custom database).
You are looking for Repeatable Fields.
Here in WPSE, it was covered in the following Q&A:
Custom Meta Boxes: Store two values in one repeatable field
A Gist:
https://gist.github.com/2057532
Class helpers for building the plugin options page: