Drupal form submission to a 3rd party website

你。 提交于 2019-12-11 11:47:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!