I have a really simple form of which I need to show the value posted in 'Client_custom_50', and I have tried multiple ways but I can't seem to show the results on the 'landing-thank-you.php' page, I have tried: var_dump($_REQUEST);
and I receive this:
array(12) { ["Prefs_dontMatchOnClientName"]=> string(0) ""
["Client_name"]=> string(0) ""
["Contact_name"]=> string(4) "test"
["Contact_email"]=> string(13) "test@test.com"
["Contact_phone"]=> string(14) "00000000000000"
["Client_custom_49"]=> string(0) ""
["Client_custom_50"]=> string(17) "La Cala Hill Club"
["Client_custom_48"]=> string(0) ""
["Client_custom_55"]=> string(0) ""
["formCid"]=> string(4) "6784"
["formId"]=> string(37) "6784ud015dc078c474200ba24f18aa6588afc"
["validation"]=> string(0) ""
}
I have tried echo $_REQUEST['Client_custom_50'];
perhaps I am missing something really obvious.
My form goes into our CRM system using a url of: then redirects to the thank-you page, if i tell the action to go to direct to the 'landing-thank-you.php' instead of passing through the CRM everything is fine, so how can I get it to keep the CRM action, which will then go to the thank-you (and also show my results)
index.php HTML:
<!--<form action="https://power.upsales.com/api/external/formSubmit" method="POST" class="upsale-form">-->
<form action="landing-thank-you.php" method="post" class="upsale-form">
<input type="hidden" class="form-control" name="Prefs.dontMatchOnClientName" style="display: none;" />
<input type="hidden" class="form-control" name="Client.name" style="display: none;" />
<div class="control-group">
<input type="text" class="form-control required" name="Contact.name" placeholder="Name" required />
</div>
<div class="control-group">
<input type="email" class="form-control required" placeholder="Email" name="Contact.email" required />
</div>
<div class="control-group">
<input type="text" class="form-control required" placeholder="Phone" name="Contact.phone" required />
</div>
<input type="hidden" class="form-control origin" name="Client.custom_49" />
<input type="hidden" class="form-control propertyRef" id="hiddenValue" name="Client.custom_50" value="La Cala Hill Club" />
<input type="hidden" class="form-control remarketing" name="Client.custom_48" />
<input type="hidden" class="form-control keyword" name="Client.custom_55" />
<input type="hidden" name="formCid" value="6784" />
<input type="hidden" name="formId" value="6784ud015dc078c474200ba24f18aa6588afc" />
<input type="hidden" name="validation" value="" />
<input type="submit" value="Submit" id="submit" />
</form>
thank-you page php:
//var_dump($_REQUEST);
$property = $_REQUEST['Client_custom_50'];
$propertyName = strtolower(str_replace(" ", "-", $property));
$propertyDevName = $_REQUEST['Client_custom_50'];
if ($_REQUEST['Client_custom_50'] == $propertyDevName) {
echo "<a href='download/".$propertyName.".pdf'>Download PDF for ".$property."</a>";
}