Home › Forums › Quform PHP › Editing a plain text email
- This topic has 3 replies, 2 voices, and was last updated 10 years ago by theglitch.
- AuthorPosts
- November 19, 2014 at 8:59 pm #13118theglitchParticipant
Just wanted to say that I am in love with this product. It has never let me down and I can’t wait to see what other items you come out with in the future.
Here is my question though, I need to have a plain text email of the form items. I don’t need the elements labeled like-
Name
————————
KevinI need to have each element put into special quotes like
&&Kevin&&
with each element being a different symbol that is the same in each email. So the name is always using &&x&&, the message is always **x**, and the email is @@x@@ – that way a program can parse the email for what is between the symbols.
November 19, 2014 at 9:19 pm #13119theglitchParticipantNote: I’m not looking for an automated way to label the elements in sequence. I want to set it up as something like (“XX” name “XX”) that works for me, however i’m not a procoder and still getting the hang of it all.
November 24, 2014 at 9:34 am #13169AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
November 26, 2014 at 7:05 am #13197theglitchParticipantAlly you are amazing and please no need to apologize, I’m sure you are really busy and you are generous for helping us out. I like what you did, i’m going to give it a try. I sort of ended up glueing parts of your original code with what bits my brain can do and ended up something like this for the email-
foreach ($form->getElements() as $element) {
if (!$element->isHidden()) {
echo $element->getLabel() . $n ;
if ($element->getLabel() == "First name") {
echo "$$$" . $element->getValueHtml('') . "$$$" . $n ;
}
if ($element->getLabel() == "Last name") {
echo "$$" . $element->getValueHtml('') . "$$" . $n ;
}
if ($element->getLabel() == "Company") {
echo "@@" . $element->getValueHtml('') . "@@" . $n ;
}
if ($element->getLabel() == "Phone") {
echo "!!" . $element->getValueHtml('') . "!!" . $n ;
}
It may not be the most elegant solution but it seems to work and I was able to use it for a later callout to display date information in the american MM/DD/YYYY format. Thoughts? Suggestions? Thank you again for taking the time out to help.
- AuthorPosts
- You must be logged in to reply to this topic.