I have survey page that contains multipage element within containers and set printing array results to from using explode() or without it. The name of the multiple chekboxes element is "first_question". Here is the code i have placed to onsubmit event but no luck to output any from resuts though i was able to get them simply using $_REQUEST['first_question'].
How should i edit my code or forms to operate arrays "$form->data['var_name']" and not trying to intercept data.
$array = $form->data['first_qestion'];
echo'<h2>' print_r( $array)'</h2>';
Please check that you have fixed the typo in 'first_qestion'
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
What do you mean "typo". Would you be so kind to send the screenshot or point me out other way.
The name is first_question not first_qestion - is that the problem?
Grammar =typo. Thanks it was exactly to the point i have a lot of further question too. We are choosing the right product to use.
Sorry. 'typo' = typing error or wrong spelling.
Hello. Just to be clear i have checked that regular varaible on multipage just simply being cleared on next multipage form and session should be used instead.
Do you have suggestion on which action should be placed custom php to start session.
You can use the MultiPage action to transfer form data between pages.
I have managed to use Session to data action with multipage. The form i am trying to get printed or echoed is about to send to CRM api curl query. Thanks for the tip. Will provide you with screnshots soon.
The question i have directly now is how to transform $form->data['first_qestion'] to php string variable. Have tried several techniques like implode("|",$array); and no way to echo or send string data further to CURL.
You can use the Handle Arrays action or you can code it in a Custom Code action as - for example:
$form->data['first_qestion'] = implode('|', $form->data['first_qestion'] );
Managed to do it using "data_to_session" action . It is handaling input data from checkboxes of survey starting from onsubmit event keeping variables through pages. Here is the screen.
$queryUrl = 'https://bitrixauthorizationhere/crm.lead.add.json';
$queryData = http_build_query($basebitrix24 = array(
'fields' => array(
"NAME" => $answer2,
"LAST_NAME" => $answer3,
"OPENED" => "Y",
"ASSIGNED_BY_ID" => 16,
'SOURCE_ID' => $_SERVER['REMOTE_ADDR'],
"PHONE" => array(array("VALUE" => $_REQUEST['phone'], "VALUE_TYPE" => "WORK" )),
"EMAIL" => array(array("VALUE" => $_REQUEST['email'], "VALUE_TYPE" => "WORK" )),
'params' => array("REGISTER_SONET_EVENT" => "Y")
$curl = curl_init();
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $queryUrl,
CURLOPT_POSTFIELDS => $queryData,
$result = curl_exec($curl);
$result = json_decode($result, 1);
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com