Support » Plugin: Register Plus Redux » [Plugin: Register Plus Redux] How to create a default choice for the dropdown Select Field?

  • WPChina

    (@wordpresschina)


    I’m glad I found this plugin! Is there a way to have one of the choices in my “Select Field” the default choice?

    For example, if I have “apple,banana,candy,donut,eggplant,french fry,grape,hamburger” in my dropdown alphabetically, but I want the “grape” choice to the be default choice that users first see. Is there a code or notation I can use to make sure that appears on the dropdown menu for that Select Field?

    Tks~~

    http://wordpress.org/extend/plugins/register-plus-redux/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author radiok

    (@radiok)

    Unfortunately there is not a way to set up a default choice for select fields. That is a great request. In the meantime, you could write some jQuery to accomplish pretty much the same thing. Whenever the page loads to change the value of a certain field, be that food, you would jQuery("#food").val("grape"); or something like that.

    WPChina

    (@wordpresschina)

    Excellent workaround and thanks for your quick help! It would be great to see a non-jQuery addition to the script in the future, but this is what I added now and it works very well:

    <script type="text/javascript">
    jQuery(document).ready(function() {
    jQuery("#food").val("grape");
    });
    </script>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Register Plus Redux] How to create a default choice for the dropdown Select Field?’ is closed to new replies.