Displaying date in custom email

Home Forums Quform PHP Displaying date in custom email

This topic is: resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12403
    rauschusa
    Participant

    I am using the instructions for “Accessing submitted form data from inside the emails”.

    I am also using the new Date Picker – I copied the HTML from the template and the process info from the template. I tried just calling it with <?php echo Quform::escape($form->getValue('date'));?> It won’t render the date in the email. I received this error, displayed in the email:

    Warning: htmlspecialchars() expects parameter 1 to be string, array given in .../lib/Quform.php

    I’m not really too familiar with PHP – that’s a big reason I bought this form lol.

    Since my auto-reply just uses the standard email code and process.php form insertion data (but without any of the custom organization I want to implement), the date shows correctly on the auto-reply email.

    #12406
    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.

    #12421
    rauschusa
    Participant

    When I make this change, I receive this error message during debug:

    Fatal error: Call to undefined method Quform_Element_Date::getValueHtml() in /.../quform/lib/Quform2.php on line 180

    Line 180 and surrounding:
    public function getValueHtml($name, $separator = '<br />')
    {
    $value = '';
    $element = $this->getElement($name);

    if ($element instanceof Quform_Element) {
    $value = $element->getValueHtml($separator);
    }

    return $value;
    }

    #12424
    rauschusa
    Participant

    Nevermind. Some other component of the form was not uploaded.

    However, I am now receiving the following error code for each and every field:
    Use of undefined constant QUFORM_HTMLSPECIALCHARS_DOUBLE_ENCODE -
    assumed 'QUFORM_HTMLSPECIALCHARS_DOUBLE_ENCODE'
    in .../quform/lib/Quform2.php on line 214

    To make sure I didn’t break my version 1.8 forms while updating to version 2.0.3, I named the common.php file “common2.php” and the Quform.php file “Quform2.php” and updated the process and common codes to point to these two.

    #12427
    rauschusa
    Participant

    Fixed this one too. Turns out I was using version 1.8’s common.php after all…

Viewing 5 posts - 1 through 5 (of 5 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