1

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).

2
  • Are you looking for something like this - web-design-talk.co.uk/examples/2/1 You want to add many values under one custom field just like that example ?
    – Amit Kosti
    Jul 11, 2012 at 15:29
  • yes! Exactly! Could you help me with a simple example of this in case of a form in a post-new.php ? How do this with a plugin ?
    – Francesco
    Jul 13, 2012 at 9:04

1 Answer 1

1

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:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.