I want to be able to stop adding a record (and display a message) to a page if an option in the database is selected.So say one of my pages is http://localhost/test/pageadd and I have another table with the database record saying whether that page was accessible or not.
Which server even should I use (i.e. Page_Load / Page_Render etc) to check the “access flag” and if disabled show a message and if not continue to load the rest of the Add Page form?Thanks
i actually want to use Page_DataRendering as I want the rest of the page to load, but I just want the form to not be displayed. how do I change the visibility of the whole form?
// Page Data Rendering event
function Page_DataRendering(&$header)
{
$hideForm = TRUE;
if ($shedhideFormClosed) {
$this->FORM_NAME->Visible = false; // Hide the entire form
}
}
There is no $this->FORM_NAME, the form object is a JavaScript object, not PHP object. So you may use Startup Script to hide the form, e.g. if table name is “cars”, $(“#fcarsadd”).hide().