• I receive an email subject containing some codes, eg.

    “A022, AB25, Ab34”

    For a number of reasons that I won’t go into here, users can write some of the codes the wrong way, eg. A022 becomes A22 or A-22.

    Of course, I could create the form so that the user can choose values from a list, but codes are hundreds and the user must input 2 or 3 of them. Moreover, any JS plugin I found showed some flaw, so in the end I gave up this kind of select. The wpcf7_validate is not an option because of frustration issues (users are sure they’re writing the codes the right way, they would not understand why the form asks to write them another way).

    Since I can code, I’d like to do the following, if possible: the user writes his codes and, before the mail is sent, some PHP code modifies the final subject of the email. Is this possible? Is there any filter I can use? Consider I have many forms but only this one would benefit from this approach.

    Thanks

    • This topic was modified 9 months, 1 week ago by islp.
  • The topic ‘Edit mail subject before email sent’ is closed to new replies.