[[!FormIt? &emailTo=`[[+addressTo]]` ]] ... <select name="addressTo"> <option value="[email protected]" [[!+fi.addressTo:FormItIsSelected=`[email protected]`]]>John</option> <option value="[email protected]" [[!+fi.addressTo:FormItIsSelected=`[email protected]`]]>Jane</option> </select>
This question has been answered by guategeek. See the first response.
[[!FormIt? &emailTo=`[[+addressTo]]` ]]
[[!FormIt? &emailTo=`[[+addressTo:reverse:replace=`#==@`:replace=`*==.`]]` ]]
<?php
// Get the inquiry value
$getaddress = $hook->getValue('person');
// Reformat it to a normal address
$reverseaddress = strrev($getaddress);
$replaceat = str_replace("^", "@", $reverseaddress);
$replacedot = str_replace("*", ".", $replaceat);
// output the corected email address to a form value emailto
$hook->setValue('emailto', $replacedot);
return true; // Needed for the form to validate