I have a hidden product field with the following parameter names:
Name: ticket_name
Price: ticket_price
Quantity: ticket_quantity
Name and price are prepopulating correctly, but no matter what I do with quantity, it doesn't catch. I've tried prepopulating through the function call:
$prepopulate = array( 'ticket_quantity' => 6 );
gravity_form(5, false, false, false, $prepopulate , false);
And doing it through the field_value action:
add_action('gform_field_value_ticket_quantity', 'sftpay_ticket_quantity');
function sftpay_ticket_quantity($value) {
return 6;
}
But the form continues to output a value of 1 for the quantity:
<input type="hidden" name="input_1.3" value="1" class="ginput_quantity_5_1 gform_hidden">
<input type="hidden" name="input_1.1" value="The Musical" class="gform_hidden">
<input name="input_1.2" id="ginput_base_price_5_1" type="hidden" value="$10.00" class="gform_hidden ginput_amount">
Not sure if I'm missing something?