AH30 Posted February 21, 2009 Share Posted February 21, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/146293-would-love-some-help-to-get-php-mailer-fe-working-100/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.