This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
separating predefined address fields
Started 15 years ago by jeffgreenca | 3 posts |
-
I'm using a tool to process the e-mail generated by form submissions, and have some specific format requirements. Using the predefined address field, currently my e-mail output looks like this:
Address: 123 A City Attn Martians
Luna City, Dark Side, 66066
The MoonI need to reformat this with one field per line in the output, like:
Address 1: 123 A City
Address 2: Attn Martians
City: Luna City
State: Dark Side
ZIP: 66066
Country: The MoonIs this possible? I strongly prefer the predefined address block vs. creating standard text fields for each element of the address.
Posted 15 years ago # -
Yes, that is possible. Edit your "includes/entry-functions.php" file, search around line 314 for this code:
$entry_details[$i]['value'] = $entry_data['element_'.$element_id.'_1'].' '.$entry_data['element_'.$element_id.'_2'].'<br />'.$entry_data['element_'.$element_id.'_3'].' '.$entry_data['element_'.$element_id.'_4'].' '.$entry_data['element_'.$element_id.'_5'].'<br />'.$entry_data['element_'.$element_id.'_6'];
change it to become:
$entry_details[$i]['value'] = "Address 1: ".$entry_data['element_'.$element_id.'_1'].'<br />'; $entry_details[$i]['value'] .= "Address 2: ".$entry_data['element_'.$element_id.'_2'].'<br />'; $entry_details[$i]['value'] .= "City: ".rtrim($entry_data['element_'.$element_id.'_3'],',').'<br />'; $entry_details[$i]['value'] .= "State: ".$entry_data['element_'.$element_id.'_4'].'<br />'; $entry_details[$i]['value'] .= "Zip: ".$entry_data['element_'.$element_id.'_5'].'<br />'; $entry_details[$i]['value'] .= "Country: ".$entry_data['element_'.$element_id.'_6'];
MachForm Founder
Posted 15 years ago # -
THANK YOU!
Seriously, that helps so much. I appreciate the quick response.
Posted 15 years ago #
Reply
You must log in to post.