Hi Yaron, 

I've been looking at the page you pointed me.

Im having some difficulties to do it. Maybe it is something worng in my code.
I have a main template call "Relations", which must have inside of him several instances of another template called " Relation".

The code of "Relation" is this:

<noinclude>
Este es la plantilla 'Relation'. Debe ser llamada en el siguiente formato:
<pre>
{{Relation
|Kind=
|Identifier=
|Description=
}}
</pre>
Editar la página para ver el texto de la plantilla.
</noinclude><includeonly>

{| style="width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;"
! style="text-align: center; background-color:#ccccff;" colspan="2" |<big>Relation</big>
|-
! Kind
|{{{Kind}}}
|-
! Identifier
|[[{{{Identifier}}}]]
|-
! Description
|{{{Description}}}
|}
{{#set_internal:hasCategory
|Lom Relation kind={{{Kind|}}}
|Lom Relation identifier={{{Identifier|}}}
|Lom Relation description={{{Description|}}}
}}
</includeonly>

The code of "Relations" is this:

<noinclude>
Este es la plantilla 'Relations'. Debe ser llamada en el siguiente formato:
<pre>
{{Relations
|Resource=={{Relation
|Kind
|Identifier
|Description
}}
}}
</pre>
Editar la página para ver el texto de la plantilla.
</noinclude><includeonly>
{| style="width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;"
! style="text-align: center; background-color:#ccccff;" colspan="2" |<big>Relations</big>
|-
! Relation
| [[HasRelation::{{{Relation|}}}]]
|}
</includeonly>

And the code of my semantic form is this:

<noinclude>
Este es el formulario '' MyForm ''.
Para crear una página con este formulario, ingrese el nombre de la página a continuación; si la página con ese nombre ya existe, será dirigido al formulario para editar esa página.


{{#forminput:form=MyForm}}

</noinclude><includeonly>
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>

==Relations==

{{{for template|Relaciones}}}
{{{field|Resource|holds template}}}
{{{end template}}}

{{{for template|Relation|multiple|embed in field=Relaciones[Resource]}}}

{| class="formtable"
! Kind:
| {{{field|Kind}}}
|-
! Identifier:
| {{{field|Identifier}}}
|-
! Description:
| {{{field|Description}}}
|}

{{{end template}}}

'''Texto libre:'''

{{{standard input|free text|rows=10}}}
{{{standard input|summary}}}
{{{standard input|minor edit}}} {{{standard input|watch}}}
{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}}
</includeonly>

Can you give me hand and tell me what am i doing wrong?

Thanks in advance,

Marcelo.

2012/6/29 Yaron Koren <yaron@wikiworks.com>
Hi,

Yes, you can do that via the "embed in field" and "holds template" parameters - see here:

http://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms#Form_markup_language 

-Yaron


On Fri, Jun 29, 2012 at 3:55 PM, Marcelo Chiaradía <chiaradiamarcelo@gmail.com> wrote:
Hi Yaron,

Ok, I'll give it a try, thanks a lot.

One other question, does the semantic forms extension support nested templates?

For example, I have a template A, which must have several instances of a template B. I would like to complete the data for A, and create several instances of B within A, using only one semantic form.

Is that possible? If so, can you point me to an example of how to do it?

Thanks in advance,

Marcelo.


2012/6/29 Yaron Koren <yaron@wikiworks.com>
Hi Marcelo,

If I understand your question correctly - I would strongly recommend using the Semantic Internal Objects extension to store the data in that multiple-instance template, instead of just regular SMW property tags:


That will allow you to associate each set of data with its instance.

-Yaron

On Thu, Jun 28, 2012 at 9:48 PM, Marcelo Chiaradía <chiaradiamarcelo@gmail.com> wrote:
Hello everyone,

I have a page that uses a semantic form.

This semantic form allows to complete several instances of a same template I defined, 

I wanna know if there is some table in the wiki database, which relates each instance of the template which its field values.

Thanks in advance,

Marcelo.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel




--
WikiWorks · MediaWiki Consulting · http://wikiworks.com




--
WikiWorks · MediaWiki Consulting · http://wikiworks.com