Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. // Adiciona pelo ajax
  2.  $output['field_compra_credito']['codvcre'] = array(
  3.             '#type' => 'select',
  4.             '#title' => t('Crédito:'),
  5.             '#options' => $select_cred,
  6.             '#attributes' => array(
  7.                 'class' => array('form-control'),
  8.             ),
  9.             '#required' => TRUE,
  10.         );
  11.  
  12.   $output['field_compra_credito']['submit'] = array(
  13.             '#type' => 'submit',
  14.             '#submit' => array('compra_credito_submit'),
  15.             '#value' => t('Comprar'),
  16.             '#attributes' => array(
  17.                 'class' => array('btn-success'),
  18.             ),
  19.         );
  20.  
  21.     $commands[] = ajax_command_replace('#detalhes_franq', drupal_render($output));  
  22.     return array(
  23.         '#type' => 'ajax',
  24.         '#commands' => $commands,
  25.     );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement