![]() |
onBeforeInsert generating table value
Hello,
I use onBeforeInsert in my table_edit.php to generate a value which should be added to the database (will come from another subsystem so it's not available during the form input). currently i do the following but thing there is a better solution . Code:
function onBeforeInsert()Code:
myfunction($_VAR) |
May you describe a bit more what you try to do. ISPConfig has various methods to validate and filter user input incl. custom validators and custom datasources for values. A custom validator or custom datasource is a php class which can handle nearly any kind of value and the validators and datasources are just configured in the tform file, there is no overriding of onBeforeInsert nescessary then.
|
I have a form with Value A and B
What i tried to find out was how to : Entering Value A into a form --> submit the form --> use onBeforeInsert function in myform_edit.php to generate Value B and store this into the table. So Value B is not entered by the user but generate by ispconfig. I found that i simply can use $page->dataRecord['B'] = $result['object'] ; to fill B. |
Quote:
|
| All times are GMT +2. The time now is 17:19. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.