Problem is, it does not actually update this product when populating these values on the fly.
I had my other developer write this javascript and he's not very familiar with gravity forms and all the available hooks, so he is not sure how to proceed. Can anyone give me any pointers?
the js part of the plugin is below in case it's useful to anyone...
$(document).ready(function(){
var groups = [
{location:'#input_3_32',day:'#input_3_33',time:'#input_3_34',cost:'#input_3_40'},
{location:'#input_3_42',day:'#input_3_36',time:'#input_3_37',cost:'#input_3_41'},
{location:'#input_3_49',day:'#input_3_50',time:'#input_3_51',cost:'#input_3_52'},
{location:'#input_3_57',day:'#input_3_58',time:'#input_3_59',cost:'#input_3_60'},
]
var sum;
$.each(groups,function(index,value){
$(value.location).change(function(){
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: { location : $(this).val(), action: 'ptg_get_days' },
success: function(data){
$(value.day).empty();
var options = $.parseJSON(data);
$(value.day).append('<option value="">Select Day</option>');
for(i=0;i<options.length;i++){
$(value.day).append('<option value="'+options[i]+'">'+options[i]+'</option>');
}
}
});
})
$(value.day).change(function(){
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: { location:$(value.location).val(),day : $(this).val(), action: 'ptg_get_times' },
success: function(data){
$(value.time).empty();
var options = $.parseJSON(data);
$(value.time).append('<option value="">Select Time</option>');
for(i in options){
$(value.time).append('<option value="'+options[i]+'">'+i+'</option>');
}
}
});
})
$(value.time).change(function(){
$(groups[index].cost).val($(this).val());
/*
sum = 0;
for (var i in groups)
{
sum += parseInt($(groups[i].time).val());
}
*/
})
})
})