phpGeek
Posts: 13
|
Posted: 03/25/2016, 10:45 PM |
|
when you have a form say signup.php
it post http://yourdomain/signup.php?cssForm
is there anyway to mod rewrite
http://yourdomain/signup/
I have tried several times using mod rewrite but was un successful
|
|
|
DataDoIT
|
Posted: 03/26/2016, 9:12 AM |
|
CodeCharge looks for the ccsForm parameter along with the form name in
order to process the applicable events and actions from that form. If
you use mod_rewrite then that will occur *before* CodeCharge has had a
chance to check for that parameter.
Instead, let the page process as normal, then when done choose an event
to rewrite using PHP, such as After Insert, After Update, etc. Ex:
<code>
//CompanyRecordForm_AfterInsert @78-E2F37004
function CompanyRecordForm_AfterInsert(& $sender)
{
$CompanyRecordForm_AfterInsert = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $CompanyRecordForm; //Compatibility
//End CompanyRecordForm_AfterInsert
//Custom Code @127-2A29BDB7
// -------------------------
global $FileName, $Redirect;
//Redirect back to the page in edit mode.
$QueryString = CCGetQueryString("QueryString", "");
$QueryString = CCRemoveParam($QueryString, "ccsForm");
$QueryString = CCAddParam($QueryString, "action", "Edit");
$QueryString = CCAddParam($QueryString, "id", $CompanyID);
$Redirect = $FileName . "?" . $QueryString;
// -------------------------
//End Custom Code
//Close CompanyRecordForm_AfterInsert @78-F737F351
return $CompanyRecordForm_AfterInsert;
}
//End Close CompanyRecordForm_AfterInsert
</code>
|
|
|
|