Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm not sure what this is called and have not had much success searching for it yet. In a plugin settings page, I would like a 'combo box' or 'drop down box' that also includes the ability to add an option that is not currently included. That newly added option would be added to the options in the box from that point on.

Is there such a function within the Settings API or does it need a separate text box that is then added to the options array?

Or a better way altogether?

Thanks :)

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

If you want to do it dynamically on the page you need javascript. This tutorial explains how to add a items to a <select> box. You would have a textbox, the user would type that information in, when they press a button, that would trigger a JavaScript function like the one in the tutorial. Does that answer your question?

share|improve this answer
    
Thanks, I'll check out the tutorial and let you know how I get on. Cheers, K –  kerrin Jul 11 '12 at 23:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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