Getting rid of – Select – option in multiselects?

This topic contains 4 reply and 2 voices, and was last updated by Tareq Hasan 10 years, 8 months ago
Viewing 4 Posts - 1 through 4 (of 4 total)
Author Posts
August 28, 2013 at 2:06 pm 7574
Tareq Hasan 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!
August 28, 2013 at 2:21 pm 7575
Tareq Hasan Tareq Hasan

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

August 28, 2013 at 2:29 pm 7576
inka inka

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!

August 28, 2013 at 2:44 pm 7577
inka inka

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…

August 28, 2013 at 3:34 pm 7578
Tareq Hasan Tareq Hasan

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 4 Posts - 1 through 4 (of 4 total)