I'm in the process of making an administration app for Joomla RSform! pro. The app is hosted as an article so it is on the same domain as Joomla itself.
I need to move or copy a submission from one RSform to another. The fields on the two forms, are not necessarily the same, but most of them are, however I can easily find witch fields that are on the new form.
What I have done untill now is that I get all the fields, and then make a javascript object looking something like this:
formElements = {
form:{
username:'username',
something:'something
},
hidden:{ somethinghidden:'somethinghidden'}
}
my question is now: How do I send this to the rsform.
I use the jQuery.ajax, but it doesn't work.
jQuery.ajax({
method: "POST",
url: '/index.php?option=com_rsform&formId=' + fromID,
data: formElements,
timeout: 10000,
dataType: 'html'
}).fail(function (msg) {
}).done(function (msg) {
});
the url is the same as the one that is in the tag on the submission form. So I guess this is correct as well.
I have also made a fake nodejs server where I try and submit to using the normal forms that RSforms provide, and the post object I got from there is identical to the object i create.
What am I doing wrong? Do I need to set some headers or something? or what am I missing...?
Hope someone can help, and my question make sense...
/thanks..