Add Gravity Forms custom entry

/**
 * Get submitted form and save it to Gravity
 */
if(isset($_GET['send_calculator_form'])){
	// NUMBER OF PROVIDERS
	$num_prov = (float) $_POST['num_prov'];
	// AVERAGE NUMBER OF APPOINTMENT SLOTS/DAY
	$num_appts = (float) $_POST['num_appts'];
	// AVERAGE REVENUE/ENCOUNTER
	$avg_rev = (float) $_POST['avg_rev'];
	// AVERAGE NUMBER OF KEPT APPOINTMENTS/DAY
	$avg_appts = (float) $_POST['avg_appts'];

	$campaign_id = sanitize_title ( $_POST['campaign_id'] );
	$user_id = sanitize_title ( $_POST['user_id'] );

	$input_values['form_id']  = 6;
	$input_values['1']  = $num_prov;
	$input_values['2']  = $avg_rev;
	$input_values['3']  = $num_appts;
	$input_values['4']  = $avg_appts;
	$input_values['5']  = $campaign_id;
	$input_values['6']  = $user_id;

	$result = GFAPI::add_entry( $input_values );

    print_r($result);
    exit;
}

Get in touch!

Send us a message, we are
happy to provide assistance or a project quote.