}
    ?>
>
                  <label class="long"><?php 
    _e('Quantity field', 'cart66');
    ?>
:</label>
                  <select name="product[gravity_form_qty_id]" id="product-gravity_form_qty_id">
                    <option value='0'><?php 
    _e('None', 'cart66');
    ?>
</option>
                    <?php 
    try {
        $gr = new Cart66GravityReader($product->gravityFormId);
        $fields = $gr->getStandardFields();
        foreach ($fields as $id => $label) {
            $id = str_replace("'", "", $id);
            Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Gravity Form Fields :: {$id} => {$label}");
            $selected = $product->gravityFormQtyId == $id ? 'selected="selected"' : '';
            echo "<option value='{$id}' {$selected}>{$label}</option>\n";
        }
    } catch (Cart66Exception $e) {
        $exception = Cart66Exception::exceptionMessages($e->getCode(), $e->getMessage());
        $gravityError = Cart66Common::getView('views/error-messages.php', $exception);
    }
    ?>
                  </select>
                  <?php 
    echo isset($gravityError) ? $gravityError : '';
    ?>
 public static function updateGravityProductQuantityField()
 {
     $formId = Cart66Common::getVal('formId');
     $gr = new Cart66GravityReader($formId);
     $fields = $gr->getStandardFields();
     header('Content-type: application/json');
     echo json_encode($fields);
     die;
 }