问题
I'm building a form in Drupal that needs to submit to a 3rd party website. Within the form API it seems like this is not really possible as you register form submission handlers to do all of the processing. I need to have the form method to to POST and it needs to be submitted to this website as it is a 3rd party hosted ordering system. Has anyone run into a similar situation? Any suggestions?
回答1:
Use the #action
attribute on the form array:
$form['#action'] = 'http://example.com';
来源:https://stackoverflow.com/questions/3840096/drupal-form-submission-to-a-3rd-party-website