Thanks.
I'm doing just that, but can't grab the first and last name fiel values. They have odd indexes.
add_action("gform_post_submission", "set_post_content", 10, 2);
function set_post_content($entry, $form){
var_dump($entry);
$first_name = $entry['9.3'];
$last_name = $entry['9.6'];
$quantity = $entry['7'];
$product_code = $entry['3'];
$description = 'Vehicle Sticker';
$test = '{TESTD}';
// Price::Qty::Code::Description::Flags
// 9.99::1:: 001::T-Shirt::{TEST}{TESTD}{RB}
$products = $quantity .'::' . $product_code . '::' . $description . '::' . $test ;
$address = $entry['15'];
$city = $entry['20'];
$state = $entry['16'];
$zip = $entry['34'];
$email = $entry['18'];
$phone = $entry['17'];
?>
<FORM name="MyForm" action="https://secure.internetsecure.com/process.cgi" method=post">
<input type=hidden name="GatewayID" value="15283">
<input type=hidden name="language" value="English">
<input type=hidden name="ReturnURL" value="http://www.autospy.org/EndofRegistration">
<input type=hidden name="xxxCancelURL" value="http://www.autospy.org/contact">
<input type=hidden name="Products" value="<?php echo $products; ?>">
<input type="hidden" name="xxxName" value="<?php echo $first_name; ?> <?php echo $first_name; ?>">
<input type="hidden" name="xxxAddress" value="<?php echo $address; ?>">
<input type="hidden" name="xxxCity" value="<?php echo $city; ?>">
<input type="hidden" name="xxxState" value="<?php echo $state; ?>">
<input type="hidden" name="xxxZipCode" value="<?php echo $zip; ?>">
<input type="hidden" name="xxxEmail" value="<?php echo $email; ?>">
<input type="hidden" name="xxxPhone" value="<?php echo $phone; ?>">
</FORM>
<SCRIPT LANGUAGE="JavaScript">
//document.MyForm.submit();
</SCRIPT>
<?php
}
Posted 13 years ago on Friday September 2, 2011 |
Permalink