• Resolved IT Hertz

    (@it-hertz)


    It says “Mail (2) is an additional mail template often used as an autoresponder.” for every template added. The number in parenthesis stays at 2 for all templates added by the plugin.

    You might also want to change “often used as an autoresponder” for templates beyond #2 to something like, “for creating a custom email” or some such.

    Purely aesthetics, of course, but the parenthesis number at least needs fixing.

    Thanks for the plugin. I need it for sending unique emails to multiple parties.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Roy Orbitson

    (@lev0)

    Then the author of CF7 has changed the forms output again. It definitely used to number the forms dynamically (3, 4, …). All my plugin does is repeat the second form as many times as you tell it to. If I made my own copy of their form rather than just using theirs, it could more easily break from any tiny change and I’d have to constantly check mine was compatible. I’m better off leaving it alone, because it’s more important that editing and sending the emails work.

    Plugin Author Roy Orbitson

    (@lev0)

    The titles are still numbered, the title + number in the explanation paragraph are hard-coded.

    Thread Starter IT Hertz

    (@it-hertz)

    For those interested, I did it like this:

    ?>
    <script>
    var mailcount = <?php echo json_encode($i); ?>; /* pass variable from php to js */
    document.querySelector('#wpcf7-mail-' + mailcount + ' p').innerHTML = document.querySelector('#wpcf7-mail-' + mailcount + ' p').innerHTML.replace('2', mailcount).replace('often used as an autoresponder', 'for creating a custom email');
    </script>
    <?php

    Paste the above snippet into more-mails-for-cf7.php after line 133 (using Notepad++; lines may be different with other editors).

    Plugin Author Roy Orbitson

    (@lev0)

    Changing innerHTML removes any events bound to elements within it. Your changed will also be overwritten the next time you update this plugin. If you’re really keen on changing it, consider changing only text nodes on the DOM.

    Thread Starter IT Hertz

    (@it-hertz)

    Well, although I posted the code in public, it’s really just meant as an example of one way to accomplish it, not as an elegant solution for general public consumption.

    I didn’t claim it’s update-proof, and I think it’s obvious to most that it will get wiped when the file is replaced.

    I realize most people won’t even care about this minor aesthetics issue. I was just trying a quick & dirty approach and it works, for me. I may play around with doing it in functions.php later.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘aesthetics issue’ is closed to new replies.