PDA

View Full Version : Using One FormMail Script for Multiple Forms



gramex
30-Apr-2007, 11:13 AM
Thanks Russell (and Sue) for all initial help yesterday - and the great script, superb documentation, well-laid site and responsive forums - you rule the Web in free form mail!

BACKGROUND TO REQUEST

I am now working on modifying your script for my client's site for translation and related services in 3 languages in Mexico (essentially 3 versions - in English, Spanish and French - with seamless linking between each version and given page).

In each version, I have a 'Contact Us' page - where a visitor opts to either send a simple email or selects one of 4 options to provide more details (for translation, interpretation work, etc.) - each on a related form in related language.

NOTE: If for a 'translation' contact form, visitor may also attach several files

In effect, I have 15 possible 'Contact' forms (3 languages x 5 forms) and will probably have 15 corresponding 'AutoResponse' forms.

NOTE: All my data from forms (values+inputs) will be received in English - so no 'Translating FormMail Language' script version considerations are required here

REQUESTED GUIDANCE

I have printed off all your documentation, plus searched and viewed 'multiple' related postings in your forum.

Your 'mutliple-forms' feature is for consecutive pages in a form, not SEPARATE pages

As i cannot find a ready answer, I post my questions here:

1. Can I handle all through one FormMail script on my site?

2. OR, do I need to have individual scripts to handle each of the 15 cases?

3. If with only ONE script, using WHICH features? (I will try to do setups myself - I just need to know which features or combos of same could be used)

ALSO

4. I realize this should be a separate post (I will do so), but it is related here: as I am using 2 languages with accents (French and Spanish) in some words that may be used inside the scripts, how do I enter them inside specific code lines - as "ALT+0xxx" or as HTML-type coding (e.g. "é").

* * * * *

I sense 'Templates' with 'Redirects' can address the 'Autoresponses' part - that perhaps MUTLIFORMDIR, MULTIFORMURL and/or TEMPLATEDIR, TEMPLATEURL settings might be involved - and that I may want to use 'INI Files' feature too ... but my creative juices have not yet coalesced to get it together

Timely responses and suggestions from anyone is appreciated...

Saludos from Mexico...

russellr
30-Apr-2007, 08:43 PM
Hi,


1. Can I handle all through one FormMail script on my site?

2. OR, do I need to have individual scripts to handle each of the 15 cases?
It depends.

In almost all cases you can configure one FormMail script and use it with any number of forms on the one server.

We have one known limitation that might prevent you from doing this: if you want to put form-specific validations into an INI file, then you will need a separately configured FormMail for each different set of validations.

This is simply because there's only one file specified by FORM_INI_FILE (http://www.tectite.com/vbforums/../fmdoc/form_ini_file.php). Each form cannot currently specify a different value for FORM_INI_FILE (http://www.tectite.com/vbforums/../fmdoc/form_ini_file.php).

I recommend you start with one form, and then add the next one, and so on until you hit a problem.

Some of the other settings that you might need to be form-specific are:
CSVDIR (http://www.tectite.com/vbforums/../fmdoc/csvdir.php)
CSV File Settings (http://www.tectite.com/vbforums/../fmdoc/csv_file_settings.php)
FILEUPLOADS (http://www.tectite.com/vbforums/../fmdoc/fileuploads.php)
FILE_REPOSITORY (http://www.tectite.com/vbforums/../fmdoc/file_repository.php)
ATTACK_DETECTION_MANY_URLS (http://www.tectite.com/vbforums/../fmdoc/attack_detection_many_urls.php)
ATTACK_DETECTION_IGNORE_ERRORS (http://www.tectite.com/vbforums/../fmdoc/attack_detection_ignore_errors.php)Good software development is best done with a global plan and incremental work.


4. I realize this should be a separate post (I will do so), but it is related here: as I am using 2 languages with accents (French and Spanish) in some words that may be used inside the scripts, how do I enter them inside specific code lines - as "ALT+0xxx" or as HTML-type coding (e.g. "é").

Not sure. The HTML coding is probably better. A lot depends on whether you end up with form results in text or HTML.

You may need to experiment a little and remember you have the CharSet feature oin "mail_options" to use, too.

We haven't had a lot of feedback from non-English speakers. So, we've assumed that everything works fine for them.

However, there is a known limitation in the "subject" field with 8-bit and unicode characters, which we will resolve shortly.

gramex
30-Apr-2007, 09:42 PM
Thanks Russell,

To use an old Oz expression - you bluddy beaut!

I thought soon after sending my post perhaps, as your first line of answer indicated, that might be the simple solution - KISS!

And I agree, in 'incremental gradualism' too...

I - and I am sure all your forum members - truly appreciate the dedicated and thoughtful responses you provide us...

Muchisimo gracias, seņor ... (ņ = ALT+0241 on numeric pad)

gramex
30-Apr-2007, 09:50 PM
Russell - you stated at end of your post...

'However, there is a known limitation in the "subject" field with 8-bit and unicode characters, which we will resolve shortly.'

Can you elaborate on problem a bit here, now, so I can avoid a possible problem in days ahead - may apply to me...

Graeme

PS I will post you/others later with feedback on my international character experience...

russellr
01-May-2007, 12:51 AM
Hi,

Basically, the email standards allow special encoding in the headers of emails.

FormMail doesn't do those special encodings, so you have to use normal 7-bit characters.

So far, we only think this affects the "subject" line.