uses('tpl,tform,tform_actions'); $app->load('tform_actions'); class page_action extends tform_actions { function onSubmit() { global $app, $conf; // Get the parent soa record of the domain $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = '".intval($_POST["zone"])."' AND ".$app->tform->getAuthSQL('r')); // Set the server ID of the rr record to the same server ID as the parent record. $this->dataRecord["server_id"] = $soa["server_id"]; parent::onSubmit(); } } $page = new page_action; $page->onLoad(); ?>