Сообщение от laimas
|
Клонировать элементы формы и вставляя их в форму, очистив их. Я просил показать точный html код формы, его нет, поэтому конкретный код написать не могу.
|
<?php
function callback_display_form($lightbox = true) {
$field_email = null;
$field_time = null;
$field_message = null;
$label = null;
$script = null;
$description = wpautop(wpcallback_get_description());
$inline_container = null;
$field_label_name = wpcallback_get_option('field_option_label_name');
$field_placeholder_name = wpcallback_get_option('field_option_placeholder_name');
$field_label_telephone = wpcallback_get_option('field_option_label_telephone');
$field_placeholder_telephone = wpcallback_get_option('field_option_placeholder_telephone');
$field_label_email = wpcallback_get_option('field_option_label_email');
$field_placeholder_email = wpcallback_get_option('field_option_placeholder_email');
$field_label_message = wpcallback_get_option('field_option_label_message');
$field_placeholder_message = wpcallback_get_option('field_option_placeholder_message');
$field_label_submit = wpcallback_get_option('field_option_label_submit');
if($lightbox) {
$label = '<h1>' . callback_get_option('label') . '</h1>';
$script = '<script type="text/javascript" src="' . plugins_url('js/callback.js', __FILE__) . '"></script>';
}
else {вариант к моему случаю не относится поэтому вырезал}
$form_action = get_site_url() . '/?callback_action=email';
$form = <<<EOT
<div class="callback-form {$inline_container}">{$label}{$description}<form class="clearfix callback-form-container" action="{$form_action}" method="post"><label class="hear-about-us"><span>Hear about us</span><input type="text" autocomplete="off" name="hear_about_us"></label><label><span class="callback-label"><span class="label-text">{$field_label_name}</span> <span class="input-required">*</span></span><input class="validate" type="text" autocomplete="off" name="callback_name" placeholder="{$field_placeholder_name}"></label><label><span class="callback-label"><span class="label-text">{$field_label_address}</span> <span class="input-required">*</span></span><input class="validate" type="text" autocomplete="off" name="callback_address" placeholder="{$field_placeholder_address}"></label><label><span class="callback-label"><span class="label-text">{$field_label_telephone}</span> <span class="input-required">*</span></span><input class="validate" type="text" autocomplete="off" name="callback_telephone" placeholder="{$field_placeholder_telephone}"></label>{$field_email}{$field_time}{$field_message}<input class="submit-button" type="submit" value="{$field_label_submit}"></form></div>{$script}
EOT;
return $form;
}
Код:
|
<form action="" id="form" >
<div class="col-md-3 col-sm-6 col-xs-12 form-col-1">
<select id="mySelect">
<option value="1.2"/>Зеленый</option>
<option value="1.6"/>Синий</option>
<option value="1.8"/>Красный</option>
</select>
</div>
<div class="col-md-3 col-sm-6 col-xs-12 form-col-2">
<input type="number" step="1" id="height">
</div>
<div class="col-md-3 col-sm-6 col-xs-12 form-col-3">
<input type="number" id="width">
</div>
<div class="col-md-3 col-sm-6 col-xs-12 form-col-4">
<output id="output"></output>
</div>
</form> |
Прикрепил попап форму, а ниже форму калькулятора, в том виде, в клиром она у меня. Признателен, если подскажите