Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 86235e66fd451c247c9255718f8d5e9067cdda91 1 parent a9967ed
Bèr Kessels authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 ideal_payment_api.module
View
7 ideal_payment_api.module
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.