I have a condition where there are 5 different menu items and in a row and one form.
For each of the menu item there is a input value in the form, which looks like this:
<form action='' method='post'>
<?php
foreach($menu_items as $item){?>
<div id='' class=''>
<?php echo ('menu item description here');?>
<input type='text' name='something' value='something'>
</div>
<?php
}
?>
<button type='submit'>send</button>
</form>
Now i need only to send only one input value with form submit that has the menu class 'active'.
Is there a simple approach to this?
$("form").submit(function(event) { /* ... */ });.