title: Setting the output onclick for a form
body: <p>I wrote this</p>
  
  <pre><code>&lt;form method="post" id="create"&gt;
    &lt;div class="panel panel-success"&gt;
      &lt;div class="panel-heading"&gt;
        &lt;p&gt;Create a new Wall Post&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class="panel-body"&gt;
        &lt;textarea cols="80" id="text" name="text" rows="10" style="visibility: hidden; display: none;"&gt;&lt;/textarea&gt;
  
        &lt;script&gt;
          $('#text').wysibb(options);
        &lt;/script&gt;
  
        &lt;div class="pull-right"&gt;
          &lt;br&gt;
          &lt;button onclick="$('#text').val($('#text').htmlcode())" type="submit" name="create" class="btn btn-success"&gt;Post&lt;/button&gt;
          &lt;button type="reset" name="reset" class="btn btn-danger"&gt;Reset&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  
  
    &lt;?php
    if (isset($_REQUEST['create'])) {
        $p = WallPostManager::createWallPost($user, UserManager::isLoggedIn(), $_POST['text']);
  
        if ($p != false) {
            Utils::alert("News Post created", false);
            header('refresh: 1');
        }
    }
  </code></pre>
  
  <p>But for some reason, im getting the 'text' in bbcode when im specifying it to be on .htmlcode(), what could be happening? am i doing something wrong?</p>