Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. // Provide a submit button.
  2. $form['submit'] = array(
  3. '#type' => 'submit',
  4. '#value' => 'Get Employee',
  5. '#weight' => '4',
  6. '#ajax' => array(
  7. 'callback' => 'rolealter_form_ajax_submit',
  8. 'wrapper' => 'project_node_form',
  9. 'method' => 'replace',
  10. 'effect' => 'fade',
  11. ),
  12. );
  13.  
  14. $form['actions']['submit']['#submit'][] = '_custom_form_submit';
  15. }
  16.  
  17. $query->join('users', 'u', 'n.entity_id = u.uid'); //JOIN node with users
  18.  
  19. $query->groupBy('u.uid');//GROUP BY user ID
  20.  
  21. $query->fields('u',array('uid','name'))//SELECT the fields from node
  22. ->condition('n.field_skillss_tid', $form_state['input']['field_skills']['und'],'IN');
  23. $result = $query->execute();
  24. $form['field_user_lists']['#access'] = TRUE;
  25. while($record = $result->fetchAssoc()) {
  26. print_r($record['name']);
  27. }
  28. }else{
  29. $output = 'Enter a value';
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement