Sir, Please how do I convert MULTIPLIER DATA (REPEATER AREA) in a FORM to JSON using CF shortcode and PHP?
Forums
CONVERTER MULTIPLIER DATA TO JSON
Hi Atanunu,
I think that you can use a Custom Code action something like this:
Bob
I think that you can use a Custom Code action something like this:
<?php
$this->data['xxx'] = json_encode($this->data['xxx']);
?>
Bob
I modified the question I asked earlier. Also, Please how do I convert the whole form data to JSON using php?
Hi Atanunu,
What are you trying to do exactly ?
Best regards,
Max
What are you trying to do exactly ?
Best regards,
Max
Thanks Max!
I am trying to:
TURN FORM DATA TO JSON
TURN DATA FROM REPEATER ACTION / AREA TO JSON
Using PHP with the sample code below:
I am trying to:
Using PHP with the sample code below:
<?php
header("Content-Type: application/json; charset=UTF-8");
$returnData = $this->get("repeater_area31"); // Form Data or Repeater area data
$json = $returnData;
echo json_encode($json);
die;
?>
Hi ataunu,
One important step is to give your repeater inputs array names like SCHRE[_N_][subject] so that the data is in set of sub-arrays. Please see this FAQ for CFv5.
Bob
One important step is to give your repeater inputs array names like SCHRE[_N_][subject] so that the data is in set of sub-arrays. Please see this FAQ for CFv5.
Bob
Hi Atanunu,
form data: $this->data
And the repeater data should be a subset of the form data.
Best regards,
Max
form data: $this->data
And the repeater data should be a subset of the form data.
Best regards,
Max
This topic is locked and no more replies can be posted.