title: CakePHP form submit not working
body: <p>I've just started working with CakePHP and I want to create a form that when it is submitted it calls a function in the controller. I'm using CakePHP version 2.6</p>
  
  <p>The Code I currently have is:</p>
  
  <p>view:</p>
  
  <pre><code>&lt;div class="modal-body"&gt;
      &lt;?php echo $this-&gt;Form-&gt;create('Tweet', array('url' =&gt; array('controller' =&gt; 'posts', 'action' =&gt; 'postTweet'))); ?&gt;
      &lt;?php echo $this-&gt;Form-&gt;textarea('Tweet', array('class' =&gt; 'form-control','rows' =&gt; '3', 'placeholder' =&gt; "what's happening?", 'maxlength' =&gt; '140', 'label' =&gt; false)); ?&gt;
      &lt;?php echo $this-&gt;Form-&gt;button('Close', array('class' =&gt; 'btn btn-default', 'data-dismiss' =&gt; 'modal', 'type' =&gt; 'button'));?&gt;
      &lt;?php echo $this-&gt;Form-&gt;submit('Tweet', array('class' =&gt; 'btn btn-primary', 'type' =&gt; 'submit', 'div' =&gt; false)); ?&gt;
      &lt;?php echo $this-&gt;Form-&gt;end(); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>PostsController:</p>
  
  <pre><code>    public function postTweet(){
          //check if post is being made
          if ($this-&gt;request-&gt;is('post')) {
              //do something
          }
      }
  </code></pre>
  
  <p>HTML on page:</p>
  
  <pre><code>&lt;form action="/posts/postTweet" id="TweetIndexForm" method="post" accept-charset="utf-8"&gt;
      &lt;div style="display:none;"&gt;
          &lt;input name="_method" value="POST" type="hidden"&gt;
      &lt;/div&gt;              
      &lt;textarea name="data[Tweet][Tweet]" class="form-control" rows="3" placeholder="what's happening?" maxlength="140" id="TweetTweet"&gt;&lt;/textarea&gt;
      &lt;button class="btn btn-default" data-dismiss="modal" type="button"&gt;Close&lt;/button&gt;            
      &lt;input class="btn btn-primary" value="Tweet" type="submit"&gt;              
  &lt;/form&gt;          
  </code></pre>
  
  <p>The problem is when I click the submit button nothing happens, I've checked in Firebug and no errors are in the console tab, no POST is made in the network tab and there are also no errors logged to the error log. Any help will be great thanks.</p>
  
  <p>EDIT:
  Solved I had JavaScript preventing the form from being submitted Thanks for the help!</p>