Just wondering if it was possible for your developers to add a filter hook to the return value of getJSEditingDefinition. I would like to edit my control list values and labels.
Specifically to have a different value as the label :
I forwarded your suggestion to our developers, and I'll get back to you as soon as I hear from them. They don't work until Monday, so please don't expect a response before Tuesday, or maybe even Wednesday since they already have a few tasks to work on.
Where "$jsEditingDef->values" are the values of the input (NULL or array);
"$this->getParentTable()->getWpId()" is the table ID, and "$this" is the WPDataColumn object. You can access the WPDataTable object through $this->getParentTable().
Also, we'd add filtering of the entire JS editing definition. At the end of the method "getJSEditingDefinition" where you'll see this:
Just wondering if it was possible for your developers to add a filter hook to the return value of getJSEditingDefinition. I would like to edit my control list values and labels.
Specifically to have a different value as the label :
$distinctValue['value'] = $value;
$distinctValue['label'] = $value;
Thanks for the consideration,
Greg
Hey Greg
I forwarded your suggestion to our developers, and I'll get back to you as soon as I hear from them. They don't work until Monday, so please don't expect a response before Tuesday, or maybe even Wednesday since they already have a few tasks to work on.
Thank you for your understanding.
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 again Greg.
In file wp-content/plugins/wpdatatables/source/class.wpdatacolumn.php around line 990 you will find this:
Above that, add the filter for JS editing values, like this:
Where "$jsEditingDef->values" are the values of the input (NULL or array);
"$this->getParentTable()->getWpId()" is the table ID, and "$this" is the WPDataColumn object. You can access the WPDataTable object through $this->getParentTable().
Also, we'd add filtering of the entire JS editing definition. At the end of the method "getJSEditingDefinition" where you'll see this:
You can replace it with this:
And do the same for getJSFilterDefinition
Please let me know if these hooks and the parameters forwarded work for you.
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
These work great! I would only ask for one small change. If you could include an easy column identifier like the original header.
Changing this:
$jsEditingDef->values = apply_filters('wpdatatables_filter_js_editing_definition_values', $jsEditingDef->values, $this->getInputType(), $this->getParentTable()->getWpId(), $this);
To this:
$jsEditingDef->values = apply_filters('wpdatatables_filter_js_editing_definition_values', $jsEditingDef->values, $this->getInputType(), $this->getOriginalHeader(), $this->getParentTable()->getWpId(), $this);
Thanks again for considering this change, having so many hooks makes the plugin awesome!
Hey Greg
Thanks for confirming.
Our developers added the modification, and it will be included in our next update.
Thank you once again for testing this.
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