Home Forums Plugin Support WP User Frontend Pro Getting rid of – Select – option in multiselects?

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  Tareq Hasan 5 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7574

    inka
    Participant
    Post count: 4

    Hi, i'm trying to use the jQuery plugin chosen on the dropdowns and multiselects in my wpuf-forms.
    It generally works fine, but i have problem with the standard category-select: it shows an additional option labeled – Select – as a placeholder, which certainly can be helpful, but for my purposes i need to get rid of it.

    Could you point me to the parts of the code where this placeholder option is added, so i can find a way to edit it out?

    Thanks a lot!

    #7575

    Tareq Hasan
    Keymaster
    Post count: 2831

    Just remove the - select - text from there and make it empty. That item will not be shown in the dropdown.

    #7576

    inka
    Participant
    Post count: 4

    Ah, nevermind, i found it:

    in class/render-form.php i commented out line 1274:
    //'show_option_none' => __( '-- Select --', 'wpuf' ),
    This seems to eliminate the – Select – option in category-multiselects.

    To get rid of the option in dropdown-mode i guess one has to do the same to line 1251:
    //'show_option_none' => __( '-- Select --', 'wpuf' ),

    If i'm doing something wrong or there is a better solution, let me know…
    Thanks again!

    #7577

    inka
    Participant
    Post count: 4

    Wait, am i missing something?
    For the Form Element “Category” there's no option “Select Text” as there is for custom Dropdowns and Multiselects. I have version 2.1.7 of wpuf.

    If it is possible to get rid of the – Select – option for the category-element in the settings, i would definitely prefer doing that instead of altering the code. But i dont find it…

    #7578

    Tareq Hasan
    Keymaster
    Post count: 2831

    Sorry, I thought you were talking about the custom field multiselect text. Yes, you've to edit the file if you want to remove from category/taxonomy. You are on the right track.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Getting rid of – Select – option in multiselects?’ is closed to new replies.