Forum OpenACS Q&A: Re: want a template::widget::checkbox_in_table proc!!!

Collapse
Posted by tammy m on
Actually, I accomplished this by creating my own template for my form. I replaced the bit with table following <if @elements.widget@ in radio checkbox> in the /packages/acs-templating/resources/forms/standard.adp with the following table in my new template.
        <if @elements.widget@ in radio checkbox>
            <if @elements.label@ nil><td colspan=2>></if>
            <else><td></else>
            <noparse>
            
            <table cellpadding=4 cellspacing=0 border=0>
              <formgroup id=@elements.id@ cols=3>
                <if \@formgroup.col@ eq 1>
                  <!-- Begin row, i.e. <tr> -->                  <tr>
                </if>
                <!-- Cell layout, i.e. <td>...</td> -->
                <td>
                  <!-- Cells may be unoccupied at the end. -->                  <if \@formgroup.rownum@ le \@formgroup:rowcount@>
                       \@formgroup.widget@ \@formgroup.label@                  </if>
                  <else>
                    <!-- Placeholder to retain cell formatting -->
                  </else>
                </td>
                <if \@formgroup.col@ eq "n">
                  <!-- End row, i.e. </tr> -->
                  </tr>
                </if>
                </formgroup>
                </table><br>        
              <formerror id=@elements.id@><br>

This makes much prettier radio and checkboxes in my forms:)