How to pass data from text field using php ? ... here is my problem
I use CF7
Easy form with two pages.
- on the first page there is a text field: label: Text24 , Field Name: tekst
- on the second page I use php module with such a code :
<?php
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "https://api.pushover.net/1/messages.json",
CURLOPT_POSTFIELDS => array(
"token" => "????",
"user" => "????",
"message" => "test",
),
CURLOPT_SAFE_UPLOAD => true,
CURLOPT_RETURNTRANSFER => true,
));
curl_exec($ch);
curl_close($ch);
?>
I used ???? to mark my data🙂
This is working great🙂 The form is sending me a push notification to my phone🙂
But I would like to send instead of "test" a data obtained from first page from field tekst.
I found that in php I can not use {data:tekst} ... so I found a few inspirations but NONE is working😟
I found :
$this->data("tekst", "default value");
so I put that in line 2
and changed
"message" => "test",
to
"message" => $this,
but it is not working😟 .... the second page is not loading so I can not even see debug data.
Can someone help me how to fix this ?
😀
I use CF7
Easy form with two pages.
- on the first page there is a text field: label: Text24 , Field Name: tekst
- on the second page I use php module with such a code :
<?php
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "https://api.pushover.net/1/messages.json",
CURLOPT_POSTFIELDS => array(
"token" => "????",
"user" => "????",
"message" => "test",
),
CURLOPT_SAFE_UPLOAD => true,
CURLOPT_RETURNTRANSFER => true,
));
curl_exec($ch);
curl_close($ch);
?>
I used ???? to mark my data🙂
This is working great🙂 The form is sending me a push notification to my phone🙂
But I would like to send instead of "test" a data obtained from first page from field tekst.
I found that in php I can not use {data:tekst} ... so I found a few inspirations but NONE is working😟
I found :
$this->data("tekst", "default value");
so I put that in line 2
and changed
"message" => "test",
to
"message" => $this,
but it is not working😟 .... the second page is not loading so I can not even see debug data.
Can someone help me how to fix this ?
😀