title: send a form with serialize() function and extra data in ajax()
body: <p>I'm programming a web page for a company in CI3, and I've another problem.
  I need to send to wizard.php(controller)a serialized form and a javascript variable, but, I think that I can't send 2 variables at the same time, here is my code.</p>
  
  <pre><code>var idCompany =5;
  $(document).on('submit', '#period-form', function(event) {
      event.preventDefault();
      $.ajax({
          url: '&lt;?php echo base_url()?&gt;wizard/insertPeriod/'
          type: 'POST',
          dataType: 'json',
          data: $("#period-form").serialize(),
          success : function (json) {
              $("#alert").append(json.response_alert);
          },
          error : function (xhre) {
              console.log(xhre);
          }
      })
  });
  </code></pre>
  
  <p>As you can see, idCompany is an attribute, it has value but, I put value in another function. is possible add values to a serialized form? or how I can send a serialized form and a variable at the same time?</p>