Below are "portions" of what I have so far using FormFields (PHP/WordPress 3.8x) to create an online order form:

$ffForm->addField(new IntegerField("qty1", "Qty", FORM_FIELD_NOT_REQUIRED, 2, 1, 3, 15, 0));
$ffForm->addField(new IntegerField("qty2", "Qty", FORM_FIELD_NOT_REQUIRED, 2, 1, 3, 15, 0));
$ffForm->addField(new IntegerField("qty3", "Qty", FORM_FIELD_NOT_REQUIRED, 2, 1, 3, 15, 0));
$ffForm->addField(new IntegerField("qty_total", "Total Shirts", REQUIRED, 9, 1, 3, 15, 1));
$ffForm->formFields["qty_total"]->setEnabled(false);
$ffForm->addField(new DollarField("subtotal", "Subtotal", REQUIRED, 9, 1, 9, 1000.00, 15.00));
$ffForm->formFields["subtotal"]->setEnabled(false);

// Calculate the quantity and subtotal in real time
$ffForm->formFields["qty1"]->setExtraHtml("onchange=\"performCalculations();\"");
$ffForm->formFields["qty2"]->setExtraHtml("onchange=\"performCalculations();\"");
$ffForm->formFields["qty3"]->setExtraHtml("onchange=\"performCalculations();\"");

<? /* ADD JS CALCULATION */ ?>
<script type="text/javascript">

function performCalculations()
var qty_total = 0
var subtotal = 0

// convert qty values from strings to integers
qty1_value = parseInt(document.getElementById('qty1').value);
qty2_value = parseInt(document.getElementById('qty2').value);
qty3_value = parseInt(document.getElementById('qty3').value);
qty_total = qty1_value + qty2_value + qty3_value;
subtotal = qty_total * 15.00;

What are the lines of code to display the values "qty_total" and "subtotal" into the form? I've guessed and values are either null or NaN. UGH - help please!