Hi David!
I am using below code which is working fine for one site, but I am using multi-site functionality and each site have different form id.
in the below function I am specifying form id so it is not working for all the sites.
if you do any amendments in that code then it would be good. I will try your code too.
add_action("gform_pre_submission", "pre_submission_handler");
function pre_submission_handler($form_meta){
global $_POST;
// form id 1 is our main contact form
if($form_meta["id"] != '14'){
return;
}
//query to get HotelName and Function Manager Email Address
$query = 'SELECT h.HotelName, h.Suburb, hcw.ContactName, hcw.ContactEmail, hcw.ContactPhone, hcw.ContactFax FROM Hotel AS h LEFT JOIN HotelConfWed AS hcw ON h.ID=hcw.HotelID WHERE hcw.AreaID=1502 AND h.ID="'. $_SESSION["HotelID"].'"';
$HDetail = query_chg($query);
while ($det = mssql_fetch_array($HDetail)) {
$_POST["input_9"] = $det['HotelName'];
}
}
Thanks
Posted 13 years ago on Thursday January 13, 2011 |
Permalink