• Hi.

    I am trying to use your snippet found below, so i can use the total price field in Gravity Forms.
    Can you tell me if i got some of these concepts wrong?

    “gform_37” = the ID of the gravity form
    “repeaterId == 1” = the id of the repeater
    “gfRepeater_select(37, 1, null, 3, 1);” = i dont know what this is
    “#input_37_11” = the id of the total price input field

    Furthermore, what are the numbers in gfRepeater referring to?

    // Jannik

    jQuery(‘#gform_37’).on(‘gform_repeater_init_done gform_repeater_after_repeat gform_repeater_after_unrepeat’, function(event, repeaterId, repeatId){
    if (repeaterId == 1) {
    var totalMiles = 0;
    var milesFields = gfRepeater_select(37, 1, null, 3, 1);

    jQuery.each(milesFields, function(){
    if (this.val()) { totalMiles += Number(this.val()); }
    });

    jquery(‘#input_37_11’).val(totalMiles);
    }
    });

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jboldsen

    (@jboldsen)

    Basically, i use the repeater to enable the customer to select several products.
    As a customer, you can choose product 1 and select a few addons concerning product 1, if you want more products, you click the “+” sign generated by the repeater plugin, and you are able to select one more product where you again select the addons.
    I want the total price to be able to calculate the total price of all of the repeaters.

    // Jannik

    @jboldsen Did you ever figure this out? I need to do the same thing.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Total price’ is closed to new replies.