Results 1 to 2 of 2

Thread: How to force formmail to parse html tags inside form fields.

  1. #1
    Join Date
    Oct 2011
    Posts
    4

    Default How to force formmail to parse html tags inside form fields.

    I am trying to create a dynamic autoresponder based on the checkboxes the user clicked.

    The autoresponder will include links to different pdf files. See below an example:

    In the form I have the following checkboxes:

    Code:
    [] file 1
    [] file 2
    [] file 3
    if visitor clicks on file 1 and file 2, I want to include links to file 1 and file 2 in the autoresponder.

    I am using the fmhookpreinit to check which checkboxes were clicked and to create a field with the html code for the links:

    Code:
    $_POST["dynamic_links"] = "<a href='http://example.com/file1.pdf'>file 1</a><br /><a href='http://example.com/file2.pdf'>file 2</a><br />"
    And in the autoresponder template I am including the following:

    Code:
    Thank you for your request. See below the links to the files you requested:
    
    $dynamic_links
    
    Sincerely,
    My problem is that when the parser replaces the $dynamic_links variable in the html template, it does not parse the html tags inside the variable. My autoresponder email ends up like:

    Code:
    Thank you for your request. See below the links to the files you requested:
    
    <a href='http://example.com/file1.pdf'>file 1</a><br  /><a href='http://example.com/file2.pdf'>file 2</a><br  />
    
    Sincerely,
    Anyone has any idea how I can force the script to parse the html tags inside the $dynamic_links field?

    Thank you.

  2. #2
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: How to force formmail to parse html tags inside form fields.

    theres a new feature in recent versions of formmail

    u can do this:
    HTML Code:
    ${dynamic_links:subs}
    and this processes the field using the TEXT_SUBS setting

    u might have to adjust TEXT_SUBS for wot u want, but it should work for u

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Email Link inside HTML Email?
    By dalbeck in forum Community Support
    Replies: 8
    Last Post: 27-Apr-2010, 06:39 PM
  2. Retaining HTML Tags
    By Elso in forum FormMail Computation Module
    Replies: 1
    Last Post: 14-Feb-2009, 09:33 PM
  3. Form results showing field tags??
    By MrsT in forum Community Support
    Replies: 1
    Last Post: 21-Aug-2007, 02:39 PM
  4. Strip HTML Tags
    By thornhillguy in forum Community Support
    Replies: 1
    Last Post: 25-May-2006, 12:42 PM
  5. Recipient list inside formmail.php
    By starsailor in forum Community Support
    Replies: 3
    Last Post: 06-Mar-2006, 09:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •