PDA

View Full Version : email not sent after fmcompute



aussieworld
02-Jun-2007, 07:36 PM
Hi,

I am new with FormMail. I just spent the day learning some of its features and very impressed by it. No issue encountered. One point I am not too sure after digging into the How To and forums, it’s about the fmcompute.php

Can we use this feature without the FormMail Computation Module?

I tried to set-up a test form, such as:

...
<input type="hidden" name="fmcompute1"
value="
import function FMFatalError,FMFatalUserError;
import function FMUserError;
import string InitialVariable;
export string ResultVariable;" />
...
<tr>
<td>Compute</td>
<td><input type="text" name="InitialVariable" /></td>
</tr>
...

Then I created as fmcompute.php file :

<?php
$ResultVariable = '0';

if ($InitialVariable == '1') {
$ResultVariable = '1';
}
else {
$ResultVariable = '0';
}
echo "$ResultVariable";
?>

I can see that variable export is done, calculation is done, but the email is not sent.
It just stop after displaying the result.

Not sure what to do ...

Alain

russellr
02-Jun-2007, 08:53 PM
Hi,

Use of "fmcompute" fields requires the installation of the FormMail Computation Module.

You can't "fake" that by writing your own PHP code.

aussieworld
03-Jun-2007, 04:46 AM
Hi Russel,

Thank you for your prompt reply. I was not too sure about this, now I have confirmation :o .
So as I read in this forum, two solutions, or going to buy the module now or wait somewhere at the end of the year to have a light version integrated to FormMail.

As I am not too sure how the computation module is working, could you please tell if you can code your php within this module? Example, if I want:
1) to collect data via the form,
2) then have some specific checks/calculation on them
3) return them + perhaps new varibles (results) to FormMail to have everything sent by mail
Is it feasable, can we used standard php to code this or are we tied to a specific structure and language?

Do you have a link explaining more in detail how we have to work with the computation module?

Anyway, you FormMail software is great. I spent a day to learn, trying the different functions with test forms and no issue encountered, great features. ;)

Thanks,
Alain

russellr
06-Jun-2007, 01:51 AM
Hi,

FormMail has a "Hook System" that lets you execute PHP code at various points in its operation.

This is not yet documented and does require a good knowledge of PHP and the internals of FormMail.

The Computation Module is for performing calculations at the field level, so it's designed to make calculations easy for non-programmers.

This is yet to be documented too, and currently, only a source code license is available.

If you purchase a source code license (US$195) you get 3 months free support, and we'll help you write the calculations.

If you want to use PHP with the Hook System, you can subscribe for normal FormMail support and we'll assist you in getting access to the data you want for your PHP code.

aussieworld
12-Jun-2007, 07:55 PM
Hi Russel,

I am interested to learn more about the Hook possibilities and will subscribe to the support but for the moment I am on a project and do not have time.
So I will come back in the near future.

Thank you for your answers.

Alain