Tips and Suggestions for NetCloak and NetForms vs. 2.5:

If you're just getting started, remember that there are two levels of actions: Primary Directives (p.19) and Supplemental Directives (p.31). The important point here is that your FDML documents can only have one Primary Directive per document, but can have many Supplemental Directives and Insertion Commands (p.39). If you need the functions of more than one Primary Directive, this is still possible by using the CHAIN Supplemental Directive (p.32). Using CHAIN , NetForms will go to as many subsequent FDML documents as you need each with one Primary Directive per doc.

Check out the Maxum Website. There are downloads, manuals, FAQs, Product Descriptions and more.

Below are some FAQs and Tips from conversations with Maxum. Enjoy!

Steven Shmerler
LA Bridge Web Design


Manuals and Tutorials:

Maxum offers manuals in 3 ways:

An HTML format that is online www.maxum.com/ and also supplied in their demo downloads. They are not at the root level, so do a search or check out this or similar nesting:

  • NetCloak 2.5.3/NetCloak Introduction/NetCloak/NCUsersGuide
  • NetForms 2.5.2/Introduction/NFUsersGuide

In addition, the manuals are available in printed book form for both programs at the low low price of $9.95 each plus shipping. Just send an e-mail support@maxum.com or call (800-813-3410) if you would like to order some!

I have used both and find that having the manuals within reach is very handy. Of course, you can also print out the e-manuals too.


Using Hidden Fields to Maintain Variables From Page to Page:

How do you generate only one <UNIQUE number and have it appear in a SENDMAIL and TEXTSTORE? I've used the UNIQUE command in 3 places in my FDML doc and ended up with 3 different IDs per event.

What you need to do is generate the unique ID in the HTML form being served, include it in the form in a hidden field, and then use REPLACE commands instead of UNIQUE. This way, all 3 instances where you need the unique value will be able to access the same value, using the hidden field.

So, the question is... How do you generate the unique value? If your pages are served by NetCloak, it isn't too hard. You can use a counter to generate a unique ID. To be sure that your IDs are unique, you could append a random value, so that even if counters are lost or reset, the unique value will (probably) still be unique. Also, you may want to pre-pend an alpha charater or 2 to the unique ID. This may help avoid trouble with the file system or other applications, and will also make unique IDs easier to identify. So, in your form, you can use something like:

<INPUT TYPE=hidden NAME=UniqueVal
VALUE="UV<INSERT_COUNT Unique><INSERT_RANDOM 1000>">

This would give you a unique field you could use in your FDML files. It would look something like "UV125745" (depending on the counter and the random number generated). In your FDML, you could then replace your UNIQUE commands with:

<REPLACE UniqueVal>

If you don't use NetCloak, there are other ways to generate unique values, but NetCloak is the easiest way I can think of...


Using NetCloak & NetForms to Create eCommerce Pages

I am trying to do a simple commerce page with a quantity field whereby the items can be totaled, with tax and shipping/handling applied. I didn't see and expamples in the NetForms or NetCloak download.

Specifically, the NC manual states that NC only deals with intergers. Is it possible to use NC for commerce that deals with decimals such as $8.95? I am using the SET_LOCAL commands.

Fixed-point math has been added in NetCloak 3.0d3, and is probably your best bet. In version 2.5, I did this by not adding dollars, but adding pennies. In other words, if the variable "Item1" is $4.95 and "Item2" is $1.50, then this would be represented by:

<SET_LOCAL Item1 = 495>
<SET_LOCAL Item2 = 150>

When this gets added up and displayed, you do something like this:

<SET_LOCAL OrderTotal = Item1 + Item2>
<SET_LOCAL Dollars = OrderTotal / 100>
<SET_LOCAL Temp = Dollars * 100>
<SET_LOCAL Pennies = OrderTotal - Temp>
Your total comes to: $<INSERT_LOCAL Dollars>.<INSERT_LOCAL Pennies>

This can be moved into a macro, so that it can be simplified to:

<SET_LOCAL DispDollars = OrderTotal>
Your total comes to: <MACRO DisplayDollars>

To have this work, you would have a macro like this:

<BEGIN_MACRO DisplayDollars>
<SET_LOCAL Dollars = DispDollars / 100>
<SET_LOCAL Temp = Dollars * 100>
<SET_LOCAL Pennies = DispDollars - Temp>
$<INSERT_LOCAL Dollars>.<INSERT_LOCAL Pennies>
<END_MACRO>

This macro can be invoked anywhere, and to tell it what dollar value you want displayed, you just set the "DispDollars" variable before you call it.

I hope this helps. As you can see, it's tricky in 2.5.4, but 3.0 makes things much simpler.

John/MAXUM


Using IF, THEN Statements to Calculate State Sales Tax:

Now I'm wrestling with CA sales tax and wondering if I can cloak a page with an IF,THEN, command. I see that you mention it for FLIPMODE but I don't think this is what I need. I need to say:

<IF statefield = CA, THEN totalfield * 8.25%, ELSE "">

I'm wondering if the best way is to handle this in the .fdml file and have a separate page for only CALIF users otherwise all others go to the regular page that doesn't add in tax.

Then I could just use the SET_LOCAL commands on the CA only page.

Using NetCloak, you can do it like this:

<SET_LOCAL Tax = 0>
<HIDE><SHOW_VARIABLE Statefield "CA">
<SET_LOCAL Tax = OrderTotal * 825>
<SET_LOCAL Tax = Tax / 10000>
<SHOW>

Remember that 8.25% is equal to .0825, or 825/10000. My 5th grade math teacher would be proud!

John/MAXUM


Work-Around for Penny Amounts under 10¢

When working with with decimals, is there is a work around if the pennies start with a zero such as: 12.09 which will become 12.9

Yes. If you've got the pennies value in a local variable named "Pennies", it goes like this:

$<INSERT_LOCAL Dollars>.
<HIDE><SHOW_LOCAL Pennies == 0 1 2 3 4 5 6 7 8 9>0<SHOW>
<INSERT_LOCAL Pennies>

Note that this problem goes away in NetCloak 3.0, since it will handle floating-point variable values (hurray!).

Chris/MAXUM


NefForms and Pull Down Menus:

Is there a way to have a pull down menu option item selected when carry a variable from a form forward to another form page before submiting?

You can set a selected item in a pull-down using the SELECTED keyword in the option. You can set this dynamically using the NetForms IF command, like this:

<SELECT NAME="country">
<OPTION<IF country = "United States" THEN " SELECTED">>United States
<OPTION<IF country = "Canada" THEN " SELECTED">>Canada
<OPTION<IF country = "England" THEN " SELECTED">>England
<OPTION<IF country = "France" THEN " SELECTED">>France
<OPTION<IF country = "Germany" THEN " SELECTED">>Germany
</SELECT>


Can you use IF commands in response pages?

IF commands, like REPLACE and others, behave exactly the same way in response pages as they do in FDML files. In fact, both are sent through the same parser within NetForms...

John/MAXUM


Work-around for "Less Than", "More Than" arguments in NC 2.5

I would like to automate the shipping and Handling in my eCommerce page so that depending upon the sub-total a S&H; amount is automatically figured.

I can't find any documentation in the NF/NC manuals or on the site about defining "more than" or "less than" arguments, but am wondering is there is come kind of work around?

Shipping & Handling Table:
0 to 10.00 = 5.00
10.01 to 20.00 = 6.00
20.01 to 30.00 = 7.00
30.01 to 40.00 = 8.00
40.01 to 50.00 = 9.00
50.01 to 75.00 = 10.00
75.01 to 100.00 = 12.00
on orders over $100.00 = Call

NetCloak 2.5.x does not include any "greater than" or "less than" operators, so what you propose is not possible with 2.5.x. The good news is that it *is* possible, and much easier, with NetCloak 3.0.

We included at least two new features in NC 3 to make computing order totals easier:

  • Floating-point variable support (no more computing pennies separately!)
  • A full range of comparison operators for use in SHOW/HIDE commands: contains, is (exact text match), in, begins with, ends with, before (alphabetically), after (alphabetically), equals (numbers), less than, less than or equal, greater than, greater than or equal, and an "exists" operator.

Using NC 3 syntax, your problem would be coded as:

<!-- total1 through total5 are floating-point values like this: -->

<SET_LOCAL total1 = 39.95>

<SET_LOCAL subtotal = total1 + total2 + total3 + total4 + total5>

<HIDE<
<SHOW_LOCAL subtotal GT= 0.00><HIDE_LOCAL# subtotal LT= 10.00>
<SET_LOCAL ship = 5.00>

<SHOW_LOCAL subtotal GT 10.00><HIDE_LOCAL# subtotal LT= 20.00>
<SET_LOCAL ship = 6.00>

<SHOW_LOCAL subtotal GT 20.00><HIDE_LOCAL# subtotal LT= 30.00>
<SET_LOCAL ship = 7.00>

<SHOW_LOCAL subtotal GT 30.00><HIDE_LOCAL# subtotal LT= 40.00>
<SET_LOCAL ship = 8.00>

<SHOW_LOCAL subtotal GT 40.00><HIDE_LOCAL# subtotal LT= 50.00>
<SET_LOCAL ship = 9.00>

<SHOW_LOCAL subtotal GT 50.00><HIDE_LOCAL# subtotal LT= 75.00>
<SET_LOCAL ship = 10.00>

<SHOW_LOCAL subtotal GT 75.00><HIDE_LOCAL# subtotal LT=100.00>
<SET_LOCAL ship = 12.00>

<SET_LOCAL grosstax = .0825 * subtotal>

 


Moving Variable Data From and HTML Page to an Email:

Is it possible to get info from an HTML page into an email via SENDMAIL? From what I've found in the manuals, SET_LOCAL will not let data move from one page to another page.

User variables set via the SET_VARIABLE command do indeed persist from one connection to the next, up to a maximum of one hour after they are created. NetCloak maintains user variables for a maximum of 255 users simultaneously, and when the 256th user needs to store a variable, the oldest user variables are "bumped", so user variables are only guaranteed to exist for the current connection -- the busier the site, the shorter their "time to live".

But there's one other exception to this rule -- whenever NetCloak receives post arguments in a form submission, the old user variables for that user are wiped out to make room for the new ones.

The only way around this problem is to create a bunch of hidden fields in the form, whose values are set to the values of the existing variables. So in your case, you wouldn't need to change the commands to SET_VARIABLE commands, just use INSERT_LOCAL commands in the form INPUT tags to pass the data to the FDML file

Chris/MAXUM

L A Bridge Internet & DSL
P.O. Box 1001, Pollock Pines, CA 95726
v: 310.228.3626 ~


Home | Sign up & Fees | Services | Clients | Support | Contact
About | Search | What's New | DSL | Privacy Statement