[support] Combining two forms

Jacob Roufa jacob.roufa at gmail.com
Sat Aug 27 18:54:04 UTC 2011


Hey all,

I have two forms that I need to combine on a Drupal 6 website and I've
researched this as much as possible to no luck. The problem, for me, lies in
the fact that one of the forms is a regular node add form and the other
isn't created by the Form API (but through LM Paypal). Yet, I need a single
submit button so the node saves and the user is redirected to Paypal with
the specific IPN information for the site.

The code to generate the LM Paypal form is :

<?php
if (function_exists('lm_paypal_can_subscribe')) {
  $subid = 1;
  $theme = drupal_get_path('theme', 'mytheme');
  $button_url = $theme . '/images/pay_button.png';
  if (lm_paypal_can_subscribe ($subid)) {
    print lm_paypal_subscribe($subid,8,$button_url);
  } //endif lm_paypal
} //endif fn exists
?>

Printing this in my modified node form's validation or submission functions
doesn't work... Because of the way this form is created in the LM Paypal
module I don't have a clue how to modify it to fit in with the proper Form
API methods used to submit two forms with one button. I've also tried using
the dev version of Subform Element for Drupal 6.

Any thoughts on what I might do to fix this?
Many thanks!

Jake Roufa
208.557.9390
about.me/jacobroufa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110827/f49ce33d/attachment.html 


More information about the support mailing list