title: File /View/Elements/lookup.ctp won't render inside /View/Layouts/default.ctp (error displayed)? How can I do it?
body: <p>I want to embed an HTML input form (search bar) in /View/Layouts/default.ctp (which is Homepage presentation layout of the site). I've created /View/Elements/lookup.ctp with the following code (I wrote Element because I wanted to include that search bar on every page of the site):</p>
  
  <pre><code>&lt;?php
  echo $this-&gt;Form-&gt;create('Search', array('action' =&gt; 'lookup', 'accept-charset' =&gt; 'utf-8'));
  echo $this-&gt;Form-&gt;input(array('type' =&gt; 'search', 'name' =&gt; 'search', 'placeholder' =&gt; 'enter search term'));
  echo $this-&gt;Form-&gt;button('Search', array('type' =&gt; 'button', 'value' =&gt; 'submit')); 
  echo $this-&gt;Form-&gt;end();
  ?&gt;
  </code></pre>
  
  <p>The search bar itself should look like this:</p>
  
  <pre><code>___________________________     ______________
  | enter search term       |    |  Search      | &lt;--- button
  |_________________________|    |______________|
      ↑
   search bar
  </code></pre>
  
  <p>The generated code in /View/Layouts/default.ctp must be like this:</p>
  
  <pre><code>&lt;form id="searchForm" method="post" action="/searches/lookup" accept-charset="utf-8"&gt;
      &lt;input type="search" name="search" placeholder="enter search term" /&gt;
      &lt;button type="button" name="submit" value="submit"&gt;Search&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I included line:</p>
  
  <pre><code>&lt;?php echo $this-&gt;element('lookup'); ?&gt;
  </code></pre>
  
  <p>in /View/Layouts/default.ctp (which embeds the Element), but when I go to Homepage, it won't render this element and the error appears:</p>
  
  <p>( @Wylie: Yes, you're right. It wasn't the whole error. Here's the complete error )</p>
  
  <pre><code>#0 C:\wamp\www\lib\Cake\Model\Datasource\DboSource.php(436): PDOStatement-&gt;execute(Array)
  #1 C:\wamp\www\lib\Cake\Model\Datasource\Database\Mysql.php(307): DboSource-&gt;_execute('SHOW FULL COLUM...')
  #2 C:\wamp\www\lib\Cake\Model\Model.php(1226): Mysql-&gt;describe(Object(Search))
  #3 C:\wamp\www\lib\Cake\View\Helper\FormHelper.php(197): Model-&gt;schema()
  #4 C:\wamp\www\lib\Cake\View\Helper\FormHelper.php(450): FormHelper-&gt;_introspectModel('Search', 'fields')
  #5 C:\wamp\www\azil\View\Elements\lookup.ctp(2): FormHelper-&gt;create('Search', Array)
  #6 C:\wamp\www\lib\Cake\View\View.php(595): include('C:\wamp\www\azi...')
  #7 C:\wamp\www\lib\Cake\View\View.php(317): View-&gt;_render('C:\wamp\www\azi...', Array)
  #8 C:\wamp\www\azil\View\Layouts\default.ctp(91): View-&gt;element('lookup')
  #9 C:\wamp\www\lib\Cake\View\View.php(595): include('C:\wamp\www\azi...')
  #10 C:\wamp\www\lib\Cake\View\View.php(411): View-&gt;_render('C:\wamp\www\azi...')
  #11 C:\wamp\www\lib\Cake\View\View.php(373): View-&gt;renderLayout('&lt;h2&gt;Database ta...', 'default')
  #12 C:\wamp\www\lib\Cake\Controller\Controller.php(900): View-&gt;render('error500', NULL)
  #13 C:\wamp\www\lib\Cake\Error\ExceptionRenderer.php(282): Controller-&gt;render('error500')
  #14 C:\wamp\www\lib\Cake\Error\ExceptionRenderer.php(191): ExceptionRenderer-&gt;_outputMessageSafe('error500')
  #15 [internal function]: ExceptionRenderer-&gt;_cakeError(Object(MissingTableException))
  #16 C:\wamp\www\lib\Cake\Error\ExceptionRenderer.php(165): call_user_func_array(Array, Array)
  #17 C:\wamp\www\lib\Cake\Error\ErrorHandler.php(127): ExceptionRenderer-&gt;render()
  #18 [internal function]: ErrorHandler::handleException(Object(MissingTableException))
  #19 {main} [&lt;b&gt;CORE\Cake\Error\ErrorHandler.php
  </code></pre>
  
  <p>Missing table?! What missing table, it just need to add a couple of HTML lines inside a /View/Layouts/default.ctp. I don't understand what's going on. Please help. Thank you.</p>