Keyword

Extra Field - Headers

  • CuppaJoe
  • CuppaJoe's Avatar Topic Author
  • Offline
  • New Member
  • Share The Warmth
More
10 years 7 months ago #126956 by CuppaJoe
Extra Field - Headers was created by CuppaJoe
Hi All,

I have customised the display of k2 extra fields from being a list to in a table.

The table displays header type in col 1, Labels in col 2 and Values in col 3.
This all works ok, however, col 1 needs to span different quantity of rows depending on the number of extra fields are created before the next header.
Adding a rowspan="3" works create when there are 3 fields, but this always varies and code literally just loads header, label, value.

Can anyone recommend a way to maybe dynamically specify rowspan, probably by count the number of fields or is there a better way?

This is an example of the layout trying to achieve:
<style>
.k2_ef  {border-collapse:collapse;border-spacing:0;border-color:#999;}
.k2_ef td{padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#999;color:#444;}

</style>
<table class="k2_ef">  
  <tr>
    <td rowspan="3">Header Field 1</td>
    <td>Label Field2</td>
    <td>Value Field2</td>
  </tr>
  <tr>
    <td>Label Field3</td>
    <td>Value Field3</td>
  </tr>
  <tr>
    <td>Label Field4</td>
    <td>Value Field4</td>
  </tr>
  <tr>
    <td>Header Field 5</td>
    <td>Label Field6</td>
    <td>Value Field6</td>
  </tr>
  <tr>
    <td rowspan="4">Header Field7</td>
    <td>Label Field8</td>
    <td>Value Field9</td>
  </tr>
  <tr>
    <td>Label Field10</td>
    <td>Value Field11</td>
  </tr>
  <tr>
    <td>Label Field12</td>
    <td>Value Field13</td>
  </tr>
  <tr>
    <td>Label Field14</td>
    <td>Value Field15</td>
  </tr>
</table>

Thanks in advance.

Regards,

Joe,

ShareTheWarmth

Please Log in or Create an account to join the conversation.

  • CuppaJoe
  • CuppaJoe's Avatar Topic Author
  • Offline
  • New Member
  • Share The Warmth
More
10 years 7 months ago #126957 by CuppaJoe
Replied by CuppaJoe on topic Re: Extra Field - Headers
Attached is an example of how the table layout for extra fields should look.

Thanks,

Regards,

Joe,

ShareTheWarmth
Attachments:

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum