Can I do complex conditionals? IE, is there some way to do AND and OR in the computation?
Yes. "and" is "&&" (which for HTML validation you may need to enter as && - we need to provide a synonym) and "or" is "||"
if (qty_Item1 < 1) and (qty_Item2 < 1)
or without the redundant parentheses:
if ((qty_Item1 < 1) && (qty_Item2 < 1))
And here's a more complex one:
if (qty_Item1 < 1 && qty_Item2 < 1)
if ((item1_name == '' || qty_Item1 < 1) && (item2_name == '' || qty_Item2 < 1))
FMUserError('please select at least one item');
Yes, here are the supported operators:
Also, can comparisons be inverted? Can I use != or !< or something?
Note that the opposite of < is >=, the opposite of > is <=.
!= not equals
> greater than
>= greater than or equal
< less than
<= less than or equal
It's implemented to only show the "headline" error in the alert, not all the details.
When I use the FMUserError() function to throw an error from the module, it shows the error message to the User. But, it doesn't seem to tell me the error message in the alert email it sends me.
All I seem to get is:
The following error occurred in FormMail :
Error=One or more errors occurred in your form submission
Is that by design or am I possibly doing something wrong here?
That could certainly be changed in a future version.