$data = [
[
"name" => $phone,
"price" => $price,
"responsible_user_id" => (int) $user_amo,
"name" => "Сделка для примера",
"status_id" => 49897042,
"pipeline_id" => 5669335,
"_embedded" => [
$data = [
[
"name" => $phone,
"price" => $price,
"responsible_user_id" => (int) $user_amo,
"_embedded" => [
"leads" => [
"name" => "Сделка для примера",
"pipeline_id" => (int) $pipeline_id,
"status_id" => 49897042,
],
"metadata" => [
"category" => "forms",
"form_id" => 1,
"form_name" => "Форма на сайте",
"form_page" => $target,
"form_sent_at" => strtotime(date("Y-m-d H:i:s")),
"ip" => $ip,
"referer" => $domain
],
"contacts" => [
[
"first_name" => $name,
"custom_fields_values" => [
[
"field_code" => "EMAIL",
"values" => [
[
"enum_code" => "WORK",
"value" => $email
]
]
],
[
"field_code" => "PHONE",
"values" => [
[
"enum_code" => "WORK",
"value" => $phone
]
]
],
]
]
],
"companies" => [
[
"name" => $company
]
]
]
]
];
function true_filter_function(){
$args = array(
'post_type'=> 'bwf-events',
'orderby' => 'date', // сортировка по дате у нас будет в любом случае (но вы можете изменить/доработать это)
'order' => $_POST[ 'date' ] // ASC или DESC
);
// для таксономий
if( isset( $_POST[ 'categoryfilter' ] ) )
$args[ 'tax_query' ] = array(
array(
'taxonomy' => 'bwf_events_date',
'field' => 'id',
'terms' => $_POST[ 'categoryfilter' ]
)
);
$query = new WP_Query( $args );
while($query->have_posts()){
$query->the_post();
echo '<h2>' . get_the_title() . '</h2>';
echo get_the_content();
}
wp_reset_postdata();
}
function true_filter_function(){
$args = array(
'post_type'=> 'bwf-events',
'orderby' => 'date', // сортировка по дате у нас будет в любом случае (но вы можете изменить/доработать это)
'order' => $_POST[ 'date' ] // ASC или DESC
);
// для таксономий
if( isset( $_POST[ 'categoryfilter' ] ) )
$args[ 'tax_query' ] = array(
array(
'taxonomy' => 'bwf_events_date',
'field' => 'id',
'terms' => $_POST[ 'categoryfilter' ]
)
);
$query = new WP_Query( $args );
while($query->have_posts()){
$query->the_post();
echo '<h2>' . get_the_title() . '</h2>';
echo get_the_content();
}
wp_reset_postdata();
}
while ($arSect = $rsSect->GetNext())
{
$sectionNames = $arSect["NAME"]; // наше имя
echo "<tr><td>".$arUser['ID']."</td><td>".$arUser['NAME']." ".$arUser['LAST_NAME']." ".$arUser['SECOND_NAME']."</td><td>".$sectionNames." / ".$sectionName."</td></tr>";
}
if (isset($_GET['id'])) {
$id = ($_GET['id']);
$begetdb->where ("id", $id);
$order_data = $begetdb->getOne ("orders");
}
if(isset($_POST['poll'])) {
include 'quiz.php';
$quiz = new Quiz($_POST['poll']);
$i = 0;
foreach ($_POST['poll'] as $key => $value) {
if(strripos($key, 'question') !== false) {
$quiz->questions .= $value;
if($i < count($_POST['poll']) - 1) {
$quiz->questions .= ";";
}
}
$i++;
}
if(strlen($quiz->questions) > 0) {
$success = $quiz->InsertIntoDB();
}
}
<span class="elementor-field-option">
<input type="radio" value="1" id="form-field-field_3-0" name="question1" required="required" aria-required="true" >
<label for="form-field-field_3-0">1</label></span>
<span class="elementor-field-option">
<input type="radio" value="2" id="form-field-field_3-1" name="question1" required="required" aria-required="true">
<label for="form-field-field_3-1">2</label></span>