I need to add a page with a form in my Drupal website. This form should be submitted to another server (there is a php script ready to receive it on such server).
So, I don’t need any database update, just a page forwarding the data inserted by users to another domain.
Do you know what’s the easiest way to do it ?
thanks
ps. Also, I need to create a drop down menu with a list of countries (and regions for each country) as submenu
I am surprised noone mentioned hook_form_alter and setting
#actionto an external URL. This will make the form post directly to the other server if you have control of it you can easily redirect back. Lot easier than POSTing from your server. Another way would be toiframethe other script and use the target attribute (set$form['#attributes']['target'] = 'the_iframe'inhook_form_alter). Then you can use JS to ‘move’ the page after the submit. Upload POSTs to an iframe, you can look into that JS as well. How do you post to an iframe? discusses iframes and forms.