2009/3/20 Johannes Peeters <[email protected]>:
>
> This is more or less like how I did it. Dan, does this satisfy your
> needs?

Right, I needed to get my head round the form specification code to
understand that what was written here was actually (almost) a full
specification. However, I'm not quite sure if I'm seeing what you are
seeing. I created a form along the lines of what you suggested here:

http://das.referata.com/wiki/Test


However, when I click 'edit with form', I don't see the column
headers. I tried various tricks so that the 'edit' version would look
more like the table itself, but I can't find any combination of
template calls that actually works.

Does the above look as expected? i.e. should I not expect to be able
to add column headers to the edit version?


Cheers,
Dan.

> On Mar 19, 11:37 am, Daniel <[email protected]> wrote:
>> Hi
>> I did already create table rows like you try to achive.
>> Your approach has one shortcoming.
>> You create always a whole new table in your template "TableRow", not
>> only one additional row of the main table.
>> At the end, it's quit simple.
>>
>> The templates should look like
>>
>> Template:TableHeader:
>> {| class="wikitable"
>> ! First Column
>> ! Second Column
>> ! Third Column
>> <!-- end of template -->
>>
>> Note, that the table closing bracket is missing here. For this you
>> need another template, maybe called Template:TableFooter. There you
>> have to place closing bracket of the table definition.
>>
>> Template:TableFooter:
>> <includeonly>|}</includeonly>
>> <!-- end of template -->
>>
>> In the template for the rows, you only have to make sure to create a
>> new row.
>>
>> Template:TableRow:
>> <includeonly>|-
>> | [[has first column::{{{FirstColumnValue|}}}]]
>> | [[has second column::{{{SecondColumnValue|}}}]]
>> | [[has third column::{{{ThirdColumnValue|}}}]]</includeonly>
>> <!-- end of template -->
>>
>> In the form, you call all this templates.
>>
>> Form:CreateTable:
>> {{{for template|TableHeader}}}
>> {| class="formtable"
>> |}
>> {{{end template}}}
>>
>> {{{for template|TableRow|multiple}}}
>> {| class="formtable"
>> | {{{field|FirstColumnValue}}}
>> | {{{field|SecondColumnValue}}}
>> | {{{field|ThirdColumnValue}}}
>> |}
>> {{{end template}}}
>>
>> {{{for template|TableFooter}}}
>> {| class="formtable"
>> |}
>> {{{end template}}}
>>
>> In the page created, the calls of all this templates result in
>> rendering one table with as many rows you added.
>> Page:Whatever
>> {{TableHeader}}
>>
>> {{TableRow
>> |FirstColumnValue=Value1
>> |SecondColumnValue=Value2
>> |ThirdColumnValue=Value3}}
>>
>> {{TableRow
>> |FirstColumnValue=Value4
>> |SecondColumnValue=Value5
>> |ThirdColumnValue=Value6
>>
>> }}
>> {{TableFooter
>> }}
>>
>> -Daniel
> >
>

--~--~---------~--~----~------------~-------~--~----~
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