I am looking for a way to remove the empty choice from the selectboxes. I have searched a lot without being able to find a way. Thank you for your answer.
You should be able to achieve this in a couple of ways.
1. First, check in this Column settings, in Data tab, do you have the "allow Empty value" unchecked?
If so, and you still got some empty values - then you probably have some actual cells that are blank, and you got "Possible values for column" to "Read from table on load".
You can manually customize which values will be possible for filtering/editing, here,
if you change that to 'Define values list'
Then you can manually input the only values possible for filter/editing.
And keep the empty values unchecked, that should do it.
Thank you for this answer but it still doesn't work as you can see in the attached pictures. Furthermore, your technique does not suit me because I use a table whose data is automatically retrieved from a google sheet. The filter should automatically adjust itself if a new value is entered for this column. Do you think I can remove this value with js? Do you have another solution that meets my expectations?
Can i take a look at the back-end of this table, please?
We will do our best to devise a valid solution for your use-case.
Please provide me a temporary WP-admin (administrator) user for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue.
We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties.
You can write credentials here just check PRIVATE Reply so nobody can see them except us.
Hello, I managed to hide this empty value with some js code. But if you still want to look and find a solution directly from the plugin, I'm willing to add you as administrator to the project. Do you want me to add the following email to the project : [email protected].
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
We have discovered a bug for this behaviour.
For the time being, if we set the Number of possible values to load in the String Column Data Tab to "All", then the Empty Value is showing.
The workaround is to set the Number of possible values to a fixed number, 100 or less, then it properly hides the "empty selection" for selectbox.
And my apologies for giving the initial example as "Define values list", that is not related to this issue,
it will be the same behaviour if we leave that to "Read from table on page load".
-
Our developers isolated the bug, and they'll add it to their queue for fixing.
They will do their best to build a fix as soon as possible.
We don't have an ETA on when the fix will be available, but please keep a lookout on our wpDataTables changeLog.
It will be stated there during updates which bug fixes have been implemented at each update.
-
Let me know if that helps for the time being, until our devs fix the bug.
Hello, For my project, the fixed value technique doesn't work. When I set a value like 100, the empty value is always present. But I've made a js function that hides this value.
I am sorry to hear that this workaround does not fix the issue on your installation.
It works on our Testing Sites, but we will go over it again with our QA Team, and i will notify them that this workaround does not work in your case.
Our developers are certainly working to make a fix that should work for everyone,
we still can't say an exact ETA when it will be finished, though,
but can keep a lookout on our changeLog page if you'd like during updates( it is also available in the plugin dashboard), we will make a note there when it's fixed.
We are happy to see that you made a workaround solution with a JS function, that is great.
If you wish, you could share the function on this ticket, since it is public, so other users who might have the same issue could find it, we would appreciate it, if possible.
Here's the code to remove the empty option from the selection box:
jQuery(document).ready(function($) { $('#table_1').on('draw.dt', function() { // draw.dt is very important in this function and table_1 is the id of the table $('li[data-original-index="1"]').css({'display': 'none'}); // the empty option is always set to data-original-index=1 }); });
Hello,
I am looking for a way to remove the empty choice from the selectboxes. I have searched a lot without being able to find a way.
Thank you for your answer.
Hi, Hugues Martin.
Sorry for the delay.
-
You should be able to achieve this in a couple of ways.
1. First, check in this Column settings, in Data tab, do you have the "allow Empty value" unchecked?
If so, and you still got some empty values - then you probably have some actual cells that are blank, and you got "Possible values for column" to "Read from table on load".
You can manually customize which values will be possible for filtering/editing, here,
if you change that to 'Define values list'
Then you can manually input the only values possible for filter/editing.
And keep the empty values unchecked, that should do it.
Let me know if that helps.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Milos,
Thank you for this answer but it still doesn't work as you can see in the attached pictures.
Furthermore, your technique does not suit me because I use a table whose data is automatically retrieved from a google sheet. The filter should automatically adjust itself if a new value is entered for this column. Do you think I can remove this value with js? Do you have another solution that meets my expectations?
Attached files: error.png
error2.png
Hi, Hugues Martin.
Can i take a look at the back-end of this table, please?
We will do our best to devise a valid solution for your use-case.
Please provide me a temporary WP-admin (administrator) user for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue.
We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties.
You can write credentials here just check PRIVATE Reply so nobody can see them except us.
And point us to the table ID, please.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello,
I managed to hide this empty value with some js code. But if you still want to look and find a solution directly from the plugin, I'm willing to add you as administrator to the project. Do you want me to add the following email to the project : [email protected].
Hi, Hugues Martin.
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
We have discovered a bug for this behaviour.
For the time being, if we set the Number of possible values to load in the String Column Data Tab to "All", then the Empty Value is showing.
The workaround is to set the Number of possible values to a fixed number, 100 or less, then it properly hides the "empty selection" for selectbox.
And my apologies for giving the initial example as "Define values list", that is not related to this issue,
it will be the same behaviour if we leave that to "Read from table on page load".
-
Our developers isolated the bug, and they'll add it to their queue for fixing.
They will do their best to build a fix as soon as possible.
We don't have an ETA on when the fix will be available, but please keep a lookout on our wpDataTables changeLog.
It will be stated there during updates which bug fixes have been implemented at each update.
-
Let me know if that helps for the time being, until our devs fix the bug.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello,
For my project, the fixed value technique doesn't work. When I set a value like 100, the empty value is always present. But I've made a js function that hides this value.
Hi, Hugues Martin.
I am sorry to hear that this workaround does not fix the issue on your installation.
It works on our Testing Sites, but we will go over it again with our QA Team, and i will notify them that this workaround does not work in your case.
Our developers are certainly working to make a fix that should work for everyone,
we still can't say an exact ETA when it will be finished, though,
but can keep a lookout on our changeLog page if you'd like during updates( it is also available in the plugin dashboard), we will make a note there when it's fixed.
We are happy to see that you made a workaround solution with a JS function, that is great.
If you wish, you could share the function on this ticket, since it is public, so other users who might have the same issue could find it, we would appreciate it, if possible.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Here's the code to remove the empty option from the selection box:
jQuery(document).ready(function($) {
$('#table_1').on('draw.dt', function() { // draw.dt is very important in this function and table_1 is the id of the table
$('li[data-original-index="1"]').css({'display': 'none'}); // the empty option is always set to data-original-index=1
});
});
Hi I am looking for a solution to this problem, do you mind if you could explain how to add the js, where do I need to paste this code?
I manage to do using the plugin Script n style
Thank you for your reply
OK, that's perfect. In my case, I use the "Simple Custom CSS and JS" plugin.
No problemDoes the js code work for you?
Yes it worked perfectly! thank you!
Hi, Hugues and Raffaele.
Thank you Hugues for sharing this workaround with JS with us, that is very kind of you.
I will pass this to our developers as it will most probably help them with fixing this bug in one of the upcoming updates.
And of course, this will be useful for other users until our devs add a working fix to the plugin.
Thanks again, we truly appreciate it!
Of course, as you guys know, please don't hesitate to also open new/separate tickets if anything else comes up.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables