<?php
add_filter('ninja_forms_render_options','ninja_forms_pre_population_callback', 10, 2);
function ninja_forms_pre_population_callback($options, $settings) {	
	if( $settings['key'] == 'listselect_services' ) {
		$wpdb = connect_to_server('zinomedia');
		$rows = $wpdb->get_results("SELECT ID, NAME FROM services ORDER BY NAME ASC");		
		foreach ($rows as $obj) :		
			array_push($options, array('label' => $obj->NAME, 'value' => $obj->ID));
		endforeach;		
	}
	return $options;
}