Form inside a Modal


#1

I have a form inside a Modal. Modal is triggered after clicking a button. I have an issue with the posting. Please see script below:

Close

  <div class="header">Period</div>
  <div class="scrolling content" style="overflow: visible;">
    <p>Start New Payroll Period</p>
    <div class="ui form">
  <div class="three fields">
    <div class="field" >
      <label>From</label>
          <div class="ui right icon input" id="date_start">
      <input type="text" placeholder="From" name="date" id="date">
      <i class="calendar icon"></i>
    </div>
    </div>
  
    
  </div>
  </div>
  </div>
  <div class="actions">
    <div class="ui black deny button">
      Cancel
    </div>
	
	<button class="ui positive right labeled icon button btn btn-primary" data-dismiss="modal" type="submit">
	 Save
      <i class="checkmark icon"></i>
	</button>
  </div>
  
</div>
</form>
<!--End Modal-->

Javascript:

$(function(){
$("#closePayperiod").click(function(){
$(’#date’).calendar({ type:‘date’ });
$(".closePayperiod").modal(‘setting’, {observeChanges: true}).modal(‘show’);
});

$(".closePayperiod").modal({
inverted: false,
closable: true,
onApprove: function () {
$("#formclose").submit();
return true;
}
});
});

It does post to the php script but it does not carry the form items. when i print_r($_POST) its blank.

please help