I'm setting an array to a hidden field using JavaScript. However, the issue is that the array gets converted to a string on form submit when I catch it using PHP.
This is the code that sets the hidden input field value:
document.getElementById("hiddenFieldId").value = arrayFromJS;
Is there any workaround for this?
Actually the problem is earlier I had a select box which sent it's values nicely on form submit. But now I've got a custom select box using JS which sets comma separated values in a hidden field... So in a nutshell I want that input field to act like a pseudo-select box