title: Codeigniter - Bootstrap Modal - passing data
body: <p>I am pretty new to Codeigniter and aiming to follow best practice as I learn. Currently I have a table that is generated via DB</p>
  
  <p><strong>HTML Table</strong>
      </p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;
        &lt;a class="galName" href="#myModal" data-toggle="modal" &gt;
          &lt;?php echo $gal['name']; ?&gt;
        &lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        &lt;?php echo $gal['clientName']; ?&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p><strong>The Modal</strong></p>
  
  <pre><code>&lt;div class="modal fade hide modal-creator" id="myModal" style="display: none;" aria-hidden="true"&gt;
      &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal"&gt;×&lt;/button&gt;
          &lt;h3&gt;Edit Gallery&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;&lt;?php echo form_open('url'); ?&gt;
  
      &lt;div class="row"&gt;
          &lt;div class="span5"&gt;
              &lt;?php print_r($galleryName); ?&gt;
              &lt;div class="control-group"&gt;
                  &lt;?php
                      $galleryName = array(
                          'id'            =&gt; 'galleryName',
                          'name'          =&gt; 'galleryName',
                          'placeholder'   =&gt; 'Gallery Name',
                          'required'      =&gt; 'required',
                      );
                      echo form_label('Gallery Name:', 'galleryName');
                      echo form_input($galleryName);
                  ?&gt;
              &lt;/div&gt;&lt;!-- /control-group --&gt;
         &lt;/div&gt;&lt;!--/span5--&gt;
     &lt;/div&gt;&lt;!--/row--&gt;
  &lt;/div&gt;&lt;!-- /modal-body --&gt;
  
  &lt;div class="modal-footer"&gt;
      &lt;!-- &lt;p class="span3 resize"&gt;The following images are sized incorrectly. Click to edit&lt;/p&gt; --&gt;
      &lt;a href="javascript:;" class="btn" data-dismiss="modal"&gt;Close&lt;/a&gt;
      &lt;a href="javascript:;" class="btn btn-primary"&gt;Next&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>The link calls a bootstrap modal where I want to pass the data for the selected gallery. I know that I can pass the data via jQuery, but is it possible to keep this modal in the MVC framework and if yes how does one go about calling the controller via the modal link?</p>
  
  <p>Thanks so much on the help, and would be happy to accept any suggestions on resources for CodeIgniter. I am currently working through the Nettuts videos, though they are dated,and also  working through the user guide.</p>