[development] Using the Forms API to post information to an external source
hovercrafter at earthlink.net
Tue Aug 25 16:38:07 UTC 2009
#method specifies the way the form is submitted (either POST or GET).
You want to change [#action] to the URL you want. Of course doing that
will remove any validation from the form in FAPI. You will have to do
all the validation yourself.
Brian Vuyk wrote:
> Hello all.
> For one of my clients, we have a long multistep form that we use to
> collect information for a user and enroll him / her in a course. One
> thing we would like to do is POST some information to an external API.
> Is it possible, using the FAPI, to POST data to an external source? I
> was going to user $form['#method'], however, that only allows internal
> Worst case scenario, I could create a custom submit callback which POSTS
> the data over using CURL, but I am hoping to find a more elegant solution.
> Any suggestions?
> Thanks in advance,
More information about the development