This topic is locked

how to gen custom view and save to multi table

8/30/2011 2:23:30 AM
PHPRunner General questions
M
mimimoji author

Hello, I have a problem.
I create custom view from two table but add, edit page can't save to table.
what should I do?
Thanks, mimimoji

C
cgphp 8/30/2011

When you create a new custom view for a table you can add/edit data only for that table. If you need to add/edit data to other tables, use "Save new data in another table" action in the "Before record added/updated" events. Check this article: http://xlinesoft.com/phprunner/docs/save_new_data_in_another_table.htm

M
mimimoji author 8/30/2011

Thanks Cristian .
Good answers.
I have new Questions.

Q : I use popup add page but I can't redirect. How to redirect from popup?
No popup I can redirect.

C
cgphp 8/30/2011

In the Javascript OnLoad event of Add page:

this.on('afterSave', function(formObj, fieldControlsArr, pageObj){

location.href= 'your_page_name_list.php';

});
J
jomppa10 8/30/2011



In the Javascript onload event of Add page:

this.on('afterSave', function(formObj, fieldControlsArr, pageObj){

location.href= 'your_page_name_list.php';

});



Hi,
If you have child records (master->detail) included in popup add pages this code snippet is propably not working (quickly tested using 5.3 7474).
regards
Jouni I