wpDataTables is a WYSIWYG (What You See Is What You Get) concept based plugin. This means that the table looks and behaves the same both in back-end and in front-end. If you disable front-end editing for a column, that table will not be editable in back-end and in front-end, so you can't achieve what you're looking for to achieve.
Hey Paul, as mentioned before - if you enable editing, it will be available both on the front-end and in the back-end.
There's a way to hide the editing of certain columns in the edit modal itself, with some custom CSS, but if we do that, you cannot change the order of the columns, as that will cause the order of the editing fields to change, so the columns we hid in the editor modal will appear, and some other columns will be hidden.
If you want to try out this approach, please open a new ticket, and provide me with the URL of your front-end editable table, along with the names of the columns you want to hide, and I'll find the CSS you need.
Thanks for your reply. I seem to have managed to do this via a filter:
In this case I have disabled the status dropdown in my datatable on the my-account page.
/*disable editing of certain fields in table on my-account page*/
add_filter('wpdatatables_filter_table_metadata','mecard_table_frontend_settings',99,2);
function mecard_table_frontend_settings( $tableMetadata, $tableId) {
$disabled_columns = array('status');
if (is_page('my-account')) {
foreach ($tableMetadata->columns as $column) {
if (in_array($column->orig_header,$disabled_columns)) {
$column->editor_type = 'none';
}
}
}
return $tableMetadata;
}
When double clicking to try to edit inline, it displays this message. However in the admin area my page is still editable.
You're adding the filter to the front-page with the theme, so it's not applicable to the back-end.
This is a custom solution anyway, so I'm not able to help you with it. Included support refers only to advice.
Another thing is that we're speaking through another person's ticket - if you wish to continue this, please open a new ticket, and we'll try and help you there.
I want to make only certain fields (columns) editable from front end.
Can I do it for front end editing only?
wpDataTables is a WYSIWYG (What You See Is What You Get) concept based plugin. This means that the table looks and behaves the same both in back-end and in front-end. If you disable front-end editing for a column, that table will not be editable in back-end and in front-end, so you can't achieve what you're looking for to achieve.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
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
Hi Aleksandar,
I have the same need, is there no way to do this programmatically via a filter?
Thanks,
Paul
Hey Paul, as mentioned before - if you enable editing, it will be available both on the front-end and in the back-end.
There's a way to hide the editing of certain columns in the edit modal itself, with some custom CSS, but if we do that, you cannot change the order of the columns, as that will cause the order of the editing fields to change, so the columns we hid in the editor modal will appear, and some other columns will be hidden.
If you want to try out this approach, please open a new ticket, and provide me with the URL of your front-end editable table, along with the names of the columns you want to hide, and I'll find the CSS you need.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
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
Hi Aleksander,
Thanks for your reply. I seem to have managed to do this via a filter:
In this case I have disabled the status dropdown in my datatable on the my-account page.
When double clicking to try to edit inline, it displays this message. However in the admin area my page is still editable.
Do you see any problems with this?
Cheers,
Paul
Hi again Paul
You're adding the filter to the front-page with the theme, so it's not applicable to the back-end.
This is a custom solution anyway, so I'm not able to help you with it. Included support refers only to advice.
Another thing is that we're speaking through another person's ticket - if you wish to continue this, please open a new ticket, and we'll try and help you there.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
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
Hi Aleksander,
I solved the problem for myself, just leaving the solution here for others. No need to open another ticket.
Thanks,
Paul
Ah, gotcha, Paul, thanks for that!
I do hope others will find this useful.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
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