-
- 90 Posts
Hi There,
Using custom migx cmp
How do i simultanlesly update db fields in a custom db and some modx db tables from a cmp.
( database field has a value, After update several fields in other db will get updated with this value.
How do i do this?
Any help is greatly appriciated
Hurby
Sommige mensen hebben aan een half woord genoeg
-
- 5,888 Posts
-
- 5,888 Posts
-
- 90 Posts
Quote from: Bruno17 at Apr 19, 2016, 03:23 PMyou can setup an aftersave - hook-snippet.
here is an example:
https://github.com/Bruno17/migxRecipes/blob/master/core/components/migxrecipes/elements/snippets/migxrecipes_aftergetfields.snippet.php
Okay Thnx Bruno,
I have question yet:
Where put this snippet to trigger it from the save/done button in my cmp?
Thnx
Hurby
Sommige mensen hebben aan een half woord genoeg
-
- 5,888 Posts
There is a setting in the MIGXdb - settings-tab
Hook Snippets Example:{"aftersave":"myaftersave_snippet"}
-
- 90 Posts
Quote from: Bruno17 at Apr 19, 2016, 04:55 PMThere is a setting in the MIGXdb - settings-tab
Hook Snippets Example:{"aftersave":"myaftersave_snippet"}
Ahh,
thnx! Bruno
Regards
Hurby
Sommige mensen hebben aan een half woord genoeg