我的 Jquery 手风琴形式可以完美地工作,除非我将标签拉到整个盒子上。这个想法是将表格分开,因为要收集很多信息。
http://www.bigwavemedia.co.uk/test/(其中一个手风琴内带有 Form 标签的工作版本)
http://www.bigwavemedia.co.uk/test/index.php/stack(当我在整个手风琴系统中移动表单标签时中断)
代码--->工作版本
<div id="container">
<div class="preOrderTop">
<h1>Pre Order</h1>
</div>
<?php
$this->load->helper("form");
echo validation_errors();
echo "<div id='accordion'>";
echo "<h3>Party Details</h3>";
echo $message;
echo form_open("welcome/send_email");
echo form_label("Name:", "name");
$data = array(
"name" => "fullName",
"id" => "fullName",
"value" => set_value("fullName")
);
echo form_input($data);
echo form_label("Email:", "email");
$data = array(
"name" => "email",
"id" => "email",
"value" => set_value("email")
);
echo form_input($data);
echo form_label("Telephone", "telephone");
$data = array(
"name" => "telephone",
"id" => "telephone",
"value" => set_value("telephone")
);
echo form_input($data);
echo form_label("date", "date");
$data = array(
"name" => "date",
"id" => "date",
"value" => set_value("date")
);
echo form_input($data);
echo "<br>";
echo form_submit("contactSubmit", "send");
echo form_close();
?>
<h3>Section 2</h3>
<div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div>
<h3>Section 3</h3>
<div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>
</div>
</div>
</div>
但是当我将整个表单标签包裹在手风琴周围时,它会破裂吗?我不知道如何解决这个问题,它让我发疯。
-> 形式环绕的代码
<div id="container">
<div class="preOrderTop">
<h1>Pre Order</h1>
</div>
<?php
$this->load->helper("form");
echo validation_errors();
echo $message;
echo form_open("welcome/send_email");
echo "<div id='accordion'>";
echo "<h3>Party Details</h3>";
echo $message;
echo form_open("welcome/send_email");
echo form_label("Name:", "name");
$data = array(
"name" => "fullName",
"id" => "fullName",
"value" => set_value("fullName")
);
echo form_input($data);
echo form_label("Email:", "email");
$data = array(
"name" => "email",
"id" => "email",
"value" => set_value("email")
);
echo form_input($data);
echo form_label("Telephone", "telephone");
$data = array(
"name" => "telephone",
"id" => "telephone",
"value" => set_value("telephone")
);
echo form_input($data);
echo form_label("Date", "date");
$data = array(
"name" => "date",
"id" => "date",
"value" => set_value("date")
);
echo form_input($data);
echo "<br>";
?>
<h3>Section 2</h3>
<div>
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
</div>
<h3>Section 3</h3>
<div>
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
<ul>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>
</div>
<?php
echo form_submit("contactSubmit", "send");
echo form_close();
?>
</div>
有任何想法吗?
谢谢