Ninja Forms Filter
// Pre-Populate Talent Inquiry Form
function digisavvy_pre_pop_talent_title( $data, $field_id ){
global $ninja_forms_processing;
// Get the current form_id
$form_id = $ninja_forms_processing->get_form_ID(); // Gets the ID of the form we are currently processing.
// If the form_id is the form we want
if( $form_id == 5 ){
if( $field_id == 3 ){
$data['default_value'] = get_the_title();
}
return $data;
}
}
add_filter( 'ninja_forms_field', 'digisavvy_pre_pop_talent_title', 10, 2 );