Expand my Community achievements bar.

Submit XML to PHP

Avatar

Level 1

Hi, I have problem with that.

I`ve done regular button with javascript on click event.

var aSubmitFields = xfa.data.saveXML("pretty");

xfa.host.messageBox(aSubmitFields, "XML", 1, 0);

event.target.submitForm({

  cURL:"http://domain.com/index.php",

  aFields: aSubmitFields,

  cSubmitAs: "XML"

});

or only that

event.target.submitForm({

  cURL:"http://domain.com/index.php",

  cSubmitAs: "XML"

});

and it doesn`t work.

PHP is receiving data but it shows that XML as empty array (messageBox shows data properly).

I`ve tried also submit type button with same script. It`s receiving string but not formated as XML and when I have multiple dynamic rows (adding rows dynamically after pressing "add" button) it shows me only first row.

1 Reply

Avatar

Level 1

It would be also very helpfull if somebody could tell me how to send multiple dynamic rows to index.php becouse standard submit http button sends only first row. I know that problem is from naming of instance variables. Instances are named Row[*] but htttp sends only first row "Row" and the rest are gone becouse of same name. How to fix it? How to submit row count to XML tags or php array?