I built a form where i have to create array of objects from kind of inputs related to each other like below:
{
"name_node":{"type":"input","name":"name","validation":"required, alpha numeric"},
"content":{"type":"textarea","name":"contentco","validation":"required, alpha numeric"}
}
I used Jquery to built this array then save it to an hidden input field named "inputs" in the form. so when i submit the form i could retrieve the object above like:
$this->input->post('inputs');
What i need to do is to save the previous object into the below format instead
[inputs] => Array(
[name_node] => Array(
[type] => input
[slug] => name_node
[name] => name
[validation] => Array
(
[0] => required
[1] => alpha numeric
)
)
[content] => Array
(
[type] => textarea
[slug] => content
[name] => content
[validation] => Array
(
[0] => required
[1] => alpha numeric
)
)
)