Add taxonomy term in popup I have a select list with some options. But now I also want an option Other. And when you select the Other option there has to open a pop-up screen with the add term to vocabulary form in it. The term should not be added directly to the vocabulary, it should be "disabled" first so the administrator can approve them. 

I know how to get the taxonomy form (taxonomy_form_term, drupal_get_form, drupal_render_form) but I have some other questions:


How can I open the popup and show call the function in my module to render the form? Should I add another option to my select list?
How can I make sure when you add it, it doesn't add directly to the vocabulary (admin has to click approve)
For the first part of your question, set an event listener to bind when the other option is selected, and then display your popup. I would suggest setting a custom state (see the Form API) and listening for that state. The example given in the states API explains better:


  Each remote condition is a key/value pair specifying conditions on the
  other element that need to be met to apply the state to the element:

array(   
  'visible' =&gt; array(
    ':input[name="remote_checkbox"]' =&gt; array('checked' =&gt; TRUE),   ), ) 

  
  For example, to show a textfield only when a checkbox is checked:

 $form['toggle_me'] = array(   
   '#type' =&gt; 'checkbox',   
   '#title' =&gt; t('Tick this box to type'), 
 ); $form['settings'] = array(   
     '#type' =&gt; 'textfield',   
     '#states' =&gt; array(
     // Only show this field when the 'toggle_me' checkbox is enabled.
     'visible' =&gt; array(
       ':input[name="toggle_me"]' =&gt; array('checked' =&gt; TRUE),
 ),   
),

  
  );


jQuery UI Dialog would be a good solution for the popup. 

For the second part, there is a module to handle just this situation, so that taxonomy terms can be moderated and approved. Taxonomy Other: 


  Use case example: You have a taxonomy vocabulary called 'Organization
  type' and you want to allow users to be able to choose '- Other -' and
  add their own type. You want to use a simple select list and to keep
  the list small to encourage people to use the types you've provided.