This topic is locked

$message not show in BeforeAdd

7/20/2010 10:05:08 PM
PHPRunner General questions
G
genom author

I am create two table:

  1. Organization (main)
  2. Phone (child table)
    Create table link properties:

    Display child record on

    [*] ADD PAGE
    Add for Organization in table events BeforeAdd:

echo "Your message here";
if ( 1 == 1 ) {

$message = '<div class="message mes_not">my message</div>';

return false;

}
return true;


but when I open the form adding the organization, then when you click the add button «my message» is not displayed.
if delete [*] for ADD PAGE in table link properties - message is displayed.
WHY?
p.s. sorry for my english

A
ann 7/21/2010

Hi,
In this version detail events are not executed on Master pages (to avoid naming conflicts).

If you still need to execute details or master events on the master page here is the guide.

  1. Add to After Application Initialized event

$blockAlienEvents=false;



2. Modify Add page: Before process of master table

global $strTableName;

if($strTableName=="MasterTable")

{

... master table code if any

}

if($strTableName=="DetailsTable")

{

... details table code

}