Support Forum
Dear Support,
I have upgraded the plugin and now in the SELECT I have an extra blank option something like:
<*option></option>
<*option>1</option>
<*option>2</option>
<*option>3</option>
the first one is always blank. Can you please tell me how to fix that ?
regards
I noticed that we have to add "Placeholder" under select... I have already have hundreds of stuff and added "Default" option with value to 0. How can I avoid this placeholder ? if don't add placeholder, it should NOT add a blank list item in select.
Secondly, fir file (file_advanced).. I was comparing it like this before:
if(rwmb_meta("prefix_field_name") != "") // to check if user has select any file (image, video), but not I believe it is an Array, how to check if user has not selected any file ?
regards
Hi Maxell,
1. The empty option was created for select2 library and is required for the placeholder. Are you using simple select field?
2. Probably check if it's empty is a better way:
$meta = rwmb_meta( 'field_id' );
if ( ! empty( $meta ) ) {
// Output something
}
Hi Ahn,
I went back to old version I was using, I have hundreds of custom metas, cant make this BIG change quickly. I was using it with simple select..
regards
Hi Anh,
I am upgrading my theme, however I am still using simple SELECT but it still shows an empty <*option></option> at the top, please note that I have not included placeholder.. Please advise..
regards
Can you send me the code to check for you?
Please download it here. Can I have you email where I can share my customized file. Please remove this link once downloaded.
regards
I've just downloaded, you can remove the link. Here is my email [email protected].
Hi @Maxell, I've just pushed a fix for this on Github. Please try it. New version will be released soon.
Thanks Anh, I have updated those 2 files only and it seems to be working. Thanks..
I will test again with other possibilities and report back..
regards