Jump to content

Would love some help to get PHP Mailer FE working 100%


Recommended Posts

I've spent the last few days trying to make use of the Codeworxtech PHP Mailer FE (form to e-mail) script, but not totally successfully. Here are a few initial questions that I need to address:

 

If mandatory fields are empty, the redirect to my own error page works just fine (using 'missing_fields_redirect'), but I can't get it to do the same for validation errors. It delivers the basic page that is built by the script. I entered the file path (which is correct) into 'redirectOnFail' in the config file: is that wrong/right? I tried adding it in the script itself instead, as there is a space for it, but that made no difference (which I kind of expected, but you have to try everything, right?)

 

Next up, how do I change the phone number validation to handle phone numbers with spaces? It's set up for U.S. numbers with dots, but most of my visitors will naturally want to enter one or two spaces, not dots, and the position of the spaces will vary unfortunately. The array is currently like this:

"(^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$)"

 

Last question (for now, promise!) Is it possible/easy to add the ability to limit the length of field contents in the script? I feel that doing so only in the HTML form is not going to cut it if someone pastes my form onto another server and changes it. I can't work out if the script already does this for me.

 

If you need a link to my test form, or a plain text copy of the script, or anything like that, please ask and I will provide what you need ASAP. Many thanks.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.