I have this ul in my form
<form action="step1/" method="post" enctype="multipart/form-data" id="form">
<div class="tabs">
<ul>
<li class="dot clicked radio_buttons"></li>
<li class="active not_the_dot"><span class="l"></span><a href="#">Standard Class</a><span class="r"></span></li>
<li class="dot radio_buttons"></li><li class="not_the_dot"><span class="l"></span><a href="#">Business Class</a><span class="r"></span></li>
<li class="dot radio_buttons"></li><li class="not_the_dot"><span class="l"></span><a href="#">Premium</a><span class="r"></span></li>
</ul>
....
....
....
and then i have other items in the form as well like
<select name="quantity_id" class="quantity_select">
<option selected="selected" value="0">SELCT STATION QUANTITY</option>
<option value="1">1 Station</option>
<option value="2">2 Station</option>
<option value="3">3 Station</option>
<option value="4">4 Station</option>
<option value="5">5 Station</option>
</select>
and on the form submit the quantity_id is present but the ul value is not ....is there something i need to change to make this value available....basically i need the "active" class text like Standard, business
<ul/>
items are not form elements and will not be posted when the form is submitted. If you need to capture these values you can store them in a hidden
form element.
Example to capture the text into a hidden field, add a hidden field.
<input type="hidden" id="activeThing" name="activeThing"/>
And bind a click event to the li
:
$("ul li.not_the_dot").click(function(){
$("#activeThing").val($(this).find("a").text());
});
html form only submits only value of its input(element like input, textarea, select) tags to server in params.
so if you want to send something to the sever make it an input element. If you have some predefine variable or values to send to the server use hidden fields for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With