Hi,
I have not been able to hide your first fmcompute1 in my ini file. Any pointers on getting this to work? I have tried every way I can think of.
This fmcompute:
HTML Code:
<input type="hidden" name="fmcompute1" value="
import function FMUserError;
import string make;
import string year;
export string make_is_ford;
export string make_is_toyota;
export string year2009;
export string year2008;
export string year2007;
if (make == 'ford')
{
make_is_ford = '1';
}
" />
Goes into an INI file like this:
Code:
[special_fields]
fmcompute1 = "
import function FMUserError;
import string make;
import string year;
export string make_is_ford;
export string make_is_toyota;
export string year2009;
export string year2008;
export string year2007;
if (make == 'ford')
{
make_is_ford = '1';
}
"
To work with different pages (I mentioned this could get messy above), you can do this:
Code:
[special_fields]
fmcompute1 = "
import function FMUserError;
import int PageNumber;
if (PageNumber == 1)
{
/* logic for submission of first page */
import string make;
import string year;
export string make_is_ford;
export string make_is_toyota;
export string year2009;
export string year2008;
export string year2007;
if (make == 'ford')
{
make_is_ford = '1';
}
/* and so on.... */
}
elseif (PageNumber == 2)
{
/* logic for submission of second page */
import float Price;
if (Price < 1000)
{
FMUserError('Your car does not cost enough');
}
/* and so on.... */
}
elseif (PageNumber == 3)
{
/* logic for submission of third page */
}
"
Get the idea?
It's probably not as messy as I suggested.
Bookmarks