Hi!
My form needs to generate a number of unique coupon codes depending on the product quantity. Then, the coupons are emailed to the user as absolute links for him to print or share.
I have managed to populate a paragraph text field using gform_pre_submission to hold the coupon codes in absolute links. However, in order to have my < a > tags register as entries, I used htmlentities() on every string:
foreach ($qte_array as $coupon) {
$s = strtoupper(md5(uniqid(rand(),true)));
$string = $coupon . '-' . substr($s,0,6) . '-' . substr($s,8,4);
$eachcoupon[] = $string;
$url_string = "<a href=\"http://www.domain.com/coupon.php?offre=" . $id . "&achat=" . $achat . "&coupon=" . $string . "\" target=\"_blank\">Coupon " . $coupon . "</a><br />";
$eachcouponurl[] = htmlentities($url_string);
}
Now the problem is that when I email this paragraph text field, it's not HTML anymore... :-(
Is there a way to run some sort of html_entity_decode() to my entry, or did I take this the wrong way?