Permalink
Browse files

Added submit and validate handlers so that ideal form can be embedded.

  • Loading branch information...
1 parent a9967ed commit 86235e66fd451c247c9255718f8d5e9067cdda91 Bèr Kessels committed Apr 20, 2010
Showing with 7 additions and 0 deletions.
  1. +7 −0 ideal_payment_api.module
View
@@ -233,6 +233,8 @@ function ideal_payment_api_refresh_issuerlist() {
/**
* Load issuer form
+ * When using this form, embedded in another form, make sure you do not override the validate and submit handlers.
+ * These are needed to process the form.
*/
function ideal_payment_api_issuer_form($order) {
@@ -268,6 +270,11 @@ function ideal_payment_api_issuer_form($order) {
'#weight' => 1,
);
+ //Set the form_handlers by hand, so that our own validate and submit function
+ // will be called, even if this form is embedded in another form.
+ $form['#submit'] = array('ideal_payment_api_issuer_form_submit' => array());
+ $form['#validate'] = array('ideal_payment_api_issuer_form_validate' => array());
+
return $form;
}

0 comments on commit 86235e6

Please sign in to comment.