What is the best approach (filter, action, frontEnd Callback, etc...) to set a default value to a cell, on inserting a new row to a table, based on another cell value, in example:
I select "Add New", select the customer name in the first cell (these customer names comes from a foreign table), and based on the customer selected (id), I search for some value in another table and set a default value for the next cell in the form.
Unfortunately there is no callback or hook to use in this case. This is not easy as it looks like and it require a lot of code changing for the plugin. We had the same request just for the filtering ( cascade filtering) and the best solution was to develop an Add-on.
This is only working for the filtering option but not in the Edit modal.
So unfortunately I can not give you any guide where to look because something like this requires a lot of code changing.
Hi,
What is the best approach (filter, action, frontEnd Callback, etc...) to set a default value to a cell, on inserting a new row to a table, based on another cell value, in example:
I select "Add New", select the customer name in the first cell (these customer names comes from a foreign table), and based on the customer selected (id), I search for some value in another table and set a default value for the next cell in the form.
It's a cascade value definition.
Thanks.
Regards,
Ricardo
Hi Ricardo,
Thank you for your purchase.
Unfortunately there is no callback or hook to use in this case. This is not easy as it looks like and it require a lot of code changing for the plugin. We had the same request just for the filtering ( cascade filtering) and the best solution was to develop an Add-on.
This is only working for the filtering option but not in the Edit modal.
So unfortunately I can not give you any guide where to look because something like this requires a lot of code changing.
Best regards.
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