trigger question
8 posts
• Page 1 of 1
trigger questionHi Steve can I use the method : after_action_edit() in dataface-0.7.1 ? when I try the following: function after_action_edit(&$record){ //comment } I get this error: Warning: Missing argument 1 for tables_neu_fragen::after_action_edit() in /path/to/website/dataface-0.7.1/partner/tables/neu_fragen/neu_fragen.php on line 17 or does the method refer to $record automatically? I have do do some calculations when the record has been edited and update some fields depending on these calculations. my first try looks like this: ---------------------snip---------------------------------- function after_action_edit(&$record){ //calculate the difference $auth =& Dataface_AuthenticationTool::getInstance(); $groesse_sch = $record->val('schuhgroesse'); $fussgroesse_re = $record->val('fussgroesse_re'); $mod_re = $record->val('mod_re'); if ($groesse_sch - (($fussgroesse_re*3)) <0>setValue('mod_re', $mod_re_neu);} } ---------------------snap------------------------------------ maybe you'll find the time to provide a simple example of the after_action_edit method I still hesitate to upgrade to the last xataface release because i made some changes to the dataface core, and unfortunately i forgot to document it....(very professional...isn't it?) thanks and greetings from Berlin Martin
mmmhh..
phpbb eats code! the excerpt above should be:
cheers Martin
The reason for the error is that the after_action_edit trigger doesn't take any parameters. If you want to get the current record you would have to do this:
errors or messagesHi Steve
I'd like to, sort of "trace" my calculations in the message box(just for testing), You know , the one where "Record successfully saved" appears. Later i'd like to customize the messages relating on these calculations. I know i have done this already with dataface two years ago but i simply forgot how and i also could not find it in the documentation. do You have an idea? thanks in advance Martin
Hi Martin,
maybe you look here: http://xataface.com/documentation/tutor ... ucess_page Could be a part of your solution. Markus
8 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 34 guests |