From: Ad S. v. S. <ad....@gm...> - 2013-08-08 12:59:55
|
Hi, Still a problem though: with this there is a need for dynamically composing 'formlink' statements. And that I don't know how. The pipe in the ask-template doesn't do what it is supposed to do and replacing by {{{!}}} doesn't work either. Is there a way to dynamically compose the query string of the formlink? Thanks! Ad On 8 aug. 2013, at 14:27, Ad Strack van Schijndel <ad....@gm...> wrote: > Hi Yaron, Yury > > Thanks for your responses! > It works fine and doesn't look/feel like a hack at all. > '| Template[1][Field1]=Value for field1 || Template[2][Field2]=Value for field2 ' > creates: > {{Template > |Field1=Value for field1 > }}{{Template > |Field2=Value for field2 > }} > > This is a very nice feature I was not aware of! > > Ad > > On 5 aug. 2013, at 22:26, Yaron Koren <ya...@wi...> wrote: > >> I just looked into it - I had forgotten how to do it, but it looks like it >> can be done with a hack, by just using the instance number and the field >> number (even if it's a named field). In the query string, you could have >> something like: >> >> &Templ1[1][1]=param1&Templ1[1][2]=param2&Templ1[2][1]=param3&... >> >> -Yaron >> >> On Mon, Aug 5, 2013 at 4:05 PM, Yury Katkov <kat...@gm...> wrote: >> >>> Is that possible to do that with multiple occurrences of the same template? >>> {{Templ1|param1|param2}} >>> {{Templ1|param3|param4}} >>> {{Templ1|param5|param6}} >>> ----- >>> Yury Katkov, WikiVote >>> >>> >>> >>> On Mon, Aug 5, 2013 at 11:04 PM, Yaron Koren <ya...@wi...> wrote: >>> >>>> Hi, >>>> >>>> Sorry for taking a while to respond. I think this can be done - the >>>> parameters to #formlink just need to look like: >>>> >>>> |A[x]=V1 >>>> |B[y]=V2 >>>> >>>> ...or am I missing something? >>>> >>>> -Yaron >>>> >>>> On Mon, Aug 5, 2013 at 11:31 AM, Yury Katkov <kat...@gm...>wrote: >>>> >>>>> I have the similar need. I think it's impossible to do that now with >>>>> Forms >>>>> ----- >>>>> Yury Katkov, WikiVote >>>>> >>>>> >>>>> >>>>> On Sat, Aug 3, 2013 at 5:54 AM, parkerjwik <jos...@ho... >>>>>> wrote: >>>>> >>>>>> Hi, I am having a problem prefilling a form that contains two {{{for >>>>>> template...}}} calls, which are used to pass form field values to two >>>>>> corresponding templates. ie. I would like to use #formlink parser >>>>> function >>>>>> to prefill form fields x and y with values v1 and v2. I would then like >>>>>> pass >>>>>> values, v1 and v2 to templates A and B respectively using {{{for >>>>>> template|A}}}...{{{end template}}} and {{{for template|B}}}...{{{end >>>>>> template}}}: >>>>>> >>>>>> {{#formlink:form=Task >>>>>> |link text= update >>>>>> |Foo[x]=V1 >>>>>> |Foo[y]=V2 >>>>>> |popup}} >>>>>> >>>>>> --Form:Foo-- >>>>>> >>>>>> {{{info...}}} >>>>>> >>>>>> {{{for template|A}}} >>>>>> {| class="formtable" >>>>>> {{{field|x}}} >>>>>> |}{{{end template}}} >>>>>> >>>>>> {{{for template|B}}} >>>>>> {| class="formtable" >>>>>> {{{field|y}}} >>>>>> |}{{{end template}}} >>>>>> >>>>>> --Template:A-- >>>>>> >>>>>> do smth with {{{x}}} >>>>>> >>>>>> --Template:B-- >>>>>> >>>>>> do smth with {{{y}}} >>>>>> >>>>>> ... >>>>>> >>>>>> What happens is that the form field y gets prefilled while x does not. >>>>>> missing smth? Josh >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> >>>>> http://wikimedia.7.x6.nabble.com/prefilling-forms-with-multiple-templates-tp5010353.html >>>>>> Sent from the Semantic Mediawiki - User mailing list archive at >>>>> Nabble.com. >>>>>> >>>>>> >>>>>> >>>>> ------------------------------------------------------------------------------ >>>>>> Get your SQL database under version control now! >>>>>> Version control is standard for application code, but databases havent >>>>>> caught up. So what steps can you take to put your SQL databases under >>>>>> version control? Why should you start doing it? Read more to find out. >>>>>> >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >>>>>> _______________________________________________ >>>>>> Semediawiki-user mailing list >>>>>> Sem...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >>>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Get your SQL database under version control now! >>>>> Version control is standard for application code, but databases havent >>>>> caught up. So what steps can you take to put your SQL databases under >>>>> version control? Why should you start doing it? Read more to find out. >>>>> >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >>>>> _______________________________________________ >>>>> Semediawiki-user mailing list >>>>> Sem...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >>>>> >>>> >>>> >>>> >>>> -- >>>> WikiWorks · MediaWiki Consulting · http://wikiworks.com >>>> >>> >>> >> >> >> -- >> WikiWorks · MediaWiki Consulting · http://wikiworks.com >> ------------------------------------------------------------------------------ >> Get your SQL database under version control now! >> Version control is standard for application code, but databases havent >> caught up. So what steps can you take to put your SQL databases under >> version control? Why should you start doing it? Read more to find out. >> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk >> _______________________________________________ >> Semediawiki-user mailing list >> Sem...@li... >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |