WordPress.org

Ready to get started?Download WordPress

Forums

how to set dropdown on my setting page (1 post)

  1. Spyro webz
    Member
    Posted 2 months ago #

    i have add a sub menu under setting page.

    i have created two text field but now i want to add dropdown like
    1. Yes
    2. No

    i am trying to do this by the following code but its does not save my value.

    printf(
    
               '<select id="thumbnail" name="my_option_name[thumbnail]" value="%s" ><option selected name="my_option_name[thumbnail]">Yes</option><option name="my_option_name[thumbnail]">No</option></select>',
                isset( $this->options['thumbnail'] ) ? esc_html( $this->options['thumbnail']) : ''
            );

Reply

You must log in to post.

About this Topic