Select ads extra *option
- This topic has 9 replies, 2 voices, and was last updated 10 years ago by
Maxell.
-
AuthorPosts
-
April 23, 2016 at 5:12 PM #2884
Maxell
ParticipantDear 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
April 23, 2016 at 6:08 PM #2885Maxell
ParticipantI 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
April 23, 2016 at 9:25 PM #2888Anh Tran
KeymasterHi 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 }April 23, 2016 at 9:36 PM #2890Maxell
ParticipantHi 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
April 24, 2016 at 7:38 PM #2900Maxell
ParticipantHi 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
April 24, 2016 at 11:24 PM #2902Anh Tran
KeymasterCan you send me the code to check for you?
April 25, 2016 at 1:25 AM #2905Maxell
ParticipantPlease download it here. Can I have you email where I can share my customized file. Please remove this link once downloaded.
regards
April 25, 2016 at 8:07 AM #2907Anh Tran
KeymasterI've just downloaded, you can remove the link. Here is my email [email protected].
April 26, 2016 at 10:25 PM #2923Anh Tran
KeymasterHi @Maxell, I've just pushed a fix for this on Github. Please try it. New version will be released soon.
April 27, 2016 at 12:35 AM #2927Maxell
ParticipantThanks 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
-
AuthorPosts
- The topic ‘Select ads extra *option’ is closed to new replies.