Forums

submit data to another page using ajax

basharald 19 Apr, 2015
I have a php page for creating user: CreateUser.php?id=1&name=user

How Can in Submit my Form data to this page using Ajax request and method type=GET?! or is there any other method allow me to do this function?!

Where can i put my code ?!

thank you,
GreyHead 20 Apr, 2015
Hi basharald,

In the Form Setup tab open the HTML (Render form) action settings. Set up:

+ Form Method: Get
+ Action URL: CreateUser.php
+ AJAX Submit: Yes

Bob
basharald 23 Apr, 2015
Thank you !

But could you please send me a screenshot for this ,and in witch version of Chronoform ?!
GreyHead 23 Apr, 2015
Answer
Hi basharald,

ChronoForms v5,

Please open the HTML Render Form action and look for the settings. If you are using the Simple Wizard and can't see the action please switch the Setup Mode to 'Advanced' on the General tab of the form.

Bob
basharald 28 Apr, 2015
Hi,

I did it But i have file uploads in my form and they were not uploaded ?!
GreyHead 28 Apr, 2015
Hi basharald,

That's because:

a. the AJAX submission doesn't support file uploads.

b. you are submitting the form to a non-ChronoForms URL so that will have to handle the uploads as ChronoForms will never see the form data.

Bob
basharald 28 Apr, 2015
thank ,

so there is no solution to submit my data after my files saved in chronoforms?!
Or Is there an ajax event or something fires after the submission and resent the data to another URL !
please i need a solution for this

thank you very much
GreyHead 28 Apr, 2015
Hi basharald,

What exactly are you trying to do?

Bob
basharald 28 Apr, 2015
Hi ,Okay
I have the Chronform with some fields and file uploads , and after submit i need to:

[list=]send my form data to Submit URL (in a second server to save it).
save my files in my current server. (or if there is a way to send my files directly to the second server it will be okay)
sent the files urls. to be saved into the second server.
[/list]

thank you very much.
GreyHead 28 Apr, 2015
1 Likes
Hi basharald,

I don't know if you can upload files directly to a remote server. It might be possible . . .

I suggest that you turn off Ajax. Submit the form normally to ChronoForms, upload the files then send the form data to the remote server using cURL (or a Redirect if you need to send the User there too).

Bob
basharald 28 Apr, 2015
Thank you very much
The cURL Worked with me,

thanks a lot🙂
This topic is locked and no more replies can be posted.