Thanks Yaron,

It would be great to integrate with Yahoo's "DataTable" (or with
others like it). For now I solved it with three templates:
StartTable
TableRow
EndTable

StartTable provides the <table><tr><th>A</th></tr>
TableRow provides <tr><td>Content</td></tr> (in Mediawiki's format)
EndTable only provides </table>

That works and looks pretty neat.

On Mar 18, 7:21 pm, Yaron Koren <[email protected]> wrote:
> Well, my long-term goal is to integrate the Yahoo UI library's "DataTable"
> input into forms, and have that serve as the table editor you're talking
> about; you can see an example here:
>
> http://developer.yahoo.com/yui/examples/datatable/dt_cellediting.html
>
> For the short term, something like your first approach is probably the way
> to go, although you might be better off getting rid of the "class=formtable"
> calls, and possibly replacing with your own CSS class that minimizes the
> margins and padding.
>
> -Yaron
>
> On Wed, Mar 18, 2009 at 12:04 PM, Johannes Peeters <[email protected]>wrote:
>
>
>
>
>
> > Hi,
>
> > I am looking on how to build a basic table editor with semantic forms.
> > I would love to have an empty table in my form, with only the cell
> > headers visible. The 'add another' button would add a next row to the
> > table.
>
> > My current implementation looks like this
> > Template:TableHeader:
> > {| class="wikitable"
> > ! First Column
> > ! Second Column
> > ! Third Column
> > |}
>
> > Template:TableRow:
> > {| class="wikitable"
> > | [[has first column::{{{FirstColumnValue|}}}]]
> > | [[has second column::{{{SecondColumnValue|}}}]]
> > | [[has third column::{{{ThirdColumnValue|}}}]]
> > |}
>
> > Form:CreateTable:
> > {{{for template|TableHeader}}}
> > {| class="formtable"
> > |}
> > {{{end template}}}
>
> > {{{for template|TableRow|multiple}}}
> > {| class="formtable"
> > | {{{field|FirstColumnValue}}}
> > | {{{field|SecondColumnValue}}}
> > | {{{field|ThirdColumnValue}}}
> > |}
> > {{{end template}}}
>
> > This provides a semi-workable solution, which looks ugly. Because the
> > content of every cell will be different, there is no visible table
> > rendered. Also, a large amount of space is displayed between every row
> > (and the header).
>
> > I tried to refactor my form to wrap the rows into a table in the form
> > itself, but that messes up the page.
>
> > Form:CreateTable2
> > {| class="wikitable"
> > ! First Column
> > ! Second Column
> > ! Third Column
> > {{{for template|TableRow|multiple}}}
> > {| class="formtable"
> > | {{{field|FirstColumnValue}}}
> > | {{{field|SecondColumnValue}}}
> > | {{{field|ThirdColumnValue}}}
> > |}
> > {{{end template}}}
> > |}
>
> > An ideal situation would be to be able to use 'compound' forms,
> > something like:
> > Form:CreateTable3
> > {{{for template|TableHeader}}}
> > {| class="formtable"
> > {{{call Form:CreateTableRow}}}
> > |}
> > {{{end template}}}
>
> > Form:CreateTableRow
> > {{{for template|TableRow|multiple}}}
> > {| class="formtable"
> > | {{{field|FirstColumnValue}}}
> > | {{{field|SecondColumnValue}}}
> > | {{{field|ThirdColumnValue}}}
> > |}
>
> > Is there a solution to my problem in the current release of Semantic
> > Forms, or should I search for another solution?
>
> > Thanks!
> > Johannes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Semantic Forms" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/semantic-forms?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to