Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Provide a submit button.
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => 'Get Employee',
- '#weight' => '4',
- '#ajax' => array(
- 'callback' => 'rolealter_form_ajax_submit',
- 'wrapper' => 'project_node_form',
- 'method' => 'replace',
- 'effect' => 'fade',
- ),
- );
- $form['actions']['submit']['#submit'][] = '_custom_form_submit';
- }
- $query->join('users', 'u', 'n.entity_id = u.uid'); //JOIN node with users
- $query->groupBy('u.uid');//GROUP BY user ID
- $query->fields('u',array('uid','name'))//SELECT the fields from node
- ->condition('n.field_skillss_tid', $form_state['input']['field_skills']['und'],'IN');
- $result = $query->execute();
- $form['field_user_lists']['#access'] = TRUE;
- while($record = $result->fetchAssoc()) {
- print_r($record['name']);
- }
- }else{
- $output = 'Enter a value';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement