Last active
August 29, 2015 14:01
-
-
Save haroldSanchezb/7107c9851031fbbecacf to your computer and use it in GitHub Desktop.
submit callback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$form['filters']['button'] = array( | |
// '#weight' => '4', | |
'#type' => 'button', | |
'#value' => t('Filtrar'), | |
'#ajax' => array( | |
'callback' => 'custom_ajax_submit', | |
'wrapper' => 'id', | |
'method' => 'replace', | |
), | |
); | |
function custom_ajax_submit(&$form, &$form_state) { | |
return array( | |
'#type' => 'ajax', | |
'#commands' => array( | |
ajax_command_replace("#id", 'cambios'), | |
) | |
); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment