WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_dropdown_users not showing the list of authors (1 post)

  1. nicgios
    Member
    Posted 1 year ago #

    Hi all,
    sorry for the silly question but I'm trying to create a custom form from scratch and in the front end (a simple wp page) I'm putting something like this:

    <form action="../process.php" method="post" name="myForm">
    Créancier <input id="creancier" type="list" name="creancier" />
    <br>
    Débiteur <input id="debiteur" type="text" name="debiteur" />
    <br>
    Noix (quantité) <input id="noix" type="number" name="noix" />
    <br>
    <input type="submit" value="Submit" /></form>

    I see the fields, no problems. But I'd like to include in the form a dropdown list of authors so I pasted this code:

    <li id="users">
     <h2><?php _e('users:'); ?></h2>
       <form action="<?php bloginfo('url'); ?>" method="get">
       <?php
         $args = array(
             'exclude'                 => '1',
             'name'                    => 'authors',
             'who'                     => 'authors'
        );
        wp_dropdown_users($args);
       ?>
       <input type="submit" name="submit" value="view" />
       </form>
    </li>

    The problem is that I see only the bullet and no dropdown list... I tried to include the second piece of code in the first <form> with no result.
    Many thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic