title: Joomla 2.5 component forms
body: <p>I'm making a component for Joomla 2.5 and according to the <a href="http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_backend_actions" rel="nofollow">docs</a> there is a form folder and in it a xml file:</p>
  
  <pre><code>&lt;field
      name="id"
      type="hidden"
  /&gt;
  
  &lt;field
      name="greeting"
      type="text"
      label="COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL"
      description="COM_HELLOWORLD_HELLOWORLD_GREETING_DESC"
      size="40"
      class="inputbox"
      default=""
  /&gt;
  </code></pre>
  
  <p>I need for a field to be a checkbox, so I changed type="text" to "checkbox" which is fine for adding a new entry. But with editing I need to check the value from a database to see if the checkbox is selected or not. So for example, I'll have something like this:</p>
  
  <pre><code>&lt;field
      name="published"
      type="checkbox"
      label="COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL"
      description="COM_HELLOWORLD_HELLOWORLD_GREETING_DESC"
      size="40"
      class="checkbox"
      default=""
  /&gt;
  </code></pre>
  
  <p>and if 'published' in the database is 1, I want the default checkbox to be selected. Is there anyway to do that? Thanks!</p>