Editing a plain text email

Home Forums Quform PHP Editing a plain text email

This topic is: resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13118
    theglitch
    Participant

    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
    ————————
    Kevin

    I 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.

    #13119
    theglitch
    Participant

    Note: 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.

    #13169
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #13197
    theglitch
    Participant

    Ally 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy