Forums

Posting form data from alternate website

nassausky 13 Feb, 2012
Hi Bob,

I just posted another question a moment ago but this is unrelated. I have a form that someone created that I want submitted to another website's chronoform processor. When the user presses the submit button on site#1 and the posts go to site#2 it starts up a blank form. That same form runs fine internally from site#2. Any ideas or suggestions?.

Thanks🙂
Mike
GreyHead 13 Feb, 2012
Hi Mike,

You can do this with ChronoForms v4. Add a Custom event and redirect the remote form to that using e.g. &event=custom in the URL. You can use any of the normal ChronoForms actions to process the results.

You should be 'extra' careful to validate the results you receive as none of the usual security checked will be in place that are used for local submissions. If you can validate that the form submission is not from a spammer and sanitize the data carefully.

Bob
nassausky 13 Feb, 2012
I might have to get back to doing the task that way in the future but right now the problem is it's a Joomla 1.5 website and it already has a complex form someone created on version 3.1 RC5.5. I would be afraid to update the installation and have something go wrong with the existing form.

I was hoping that the form on site#1 that they created (unvalidated for now) could simply post the correct values to site#2 and chronoforms accepts it and processes it. Any chance on that?

Thanks for your fast response,
Mike
nassausky 13 Feb, 2012
Thanks. OK got it working using version 3 because I didn't want to have to recreate the whole form.

First I noticed the $live_site variable in the joomla configuration.php for site#2 was empty. I had to supply it the correct url. Not sure how many components need this variable. Thanks to another user mentioning it in another post here.

Second I had 'check token' turned 'on' which I turned 'off'.

If I use php in the form validation to do either of 2 things. Do you think that would be enough to keep away bots.

(1)Check if ip address is from trusted server which has it's own validation and sends the form post data to site#2 then it accepts the post
(2)Check if ip address is from unknown ip address (everything else), then the local validation like recaptcha kicks in.

Any other ideas, caveats or suggestions?
GreyHead 14 Feb, 2012
Hi nassausky,

That sounds OK to me.

Bob
This topic is locked and no more replies can be posted.