From: Stefan S. <mo...@gm...> - 2011-07-13 09:04:37
|
Hi, I don't exactly know, whether this belongs here, but is there a way to create nested forms? To be precisely, I want to call a first form from a page, giving it as a hidden field the pagename, where I came from. This first form contains a formlink to a second form, which I want to give again hidden fields, such that I can redirect back to the first form whithout losing the entered values. How can I pass the values of certain fields to other fields from form to form? I tried something similar to this: {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfield1]| ...}} and the fields are specified as follows: inside the template-tag: {{{field|hiddenField|mandatory|hidden}}} The value for the first form is simply set with the formtag using {{PAGENAME}}. Does anyone know a solution to my problem? kind regards, Stefan |
From: Stephan G. <f....@gm...> - 2011-07-13 10:00:14
|
Hi Stefan, it certainly belongs here. If I understand you right, you want to chain forms. This is not possible with current versions of SF. The next best thing might be using HeaderTabs [1]. Cheers, Stephan [1] http://www.mediawiki.org/wiki/Extension:HeaderTabs -------- Original-Nachricht -------- > Datum: Wed, 13 Jul 2011 11:04:29 +0200 > Von: Stefan Schupp <mo...@gm...> > An: sem...@li... > Betreff: [Semediawiki-user] Nested Forms > Hi, > > I don't exactly know, whether this belongs here, but is there a way to > create nested forms? To be precisely, I want to call a first form from a > page, giving it as a hidden field the pagename, where I came from. This > first form contains a formlink to a second form, which I want to give > again hidden fields, such that I can redirect back to the first form > whithout losing the entered values. > How can I pass the values of certain fields to other fields from form to > form? > I tried something similar to this: > {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfield1]| > ...}} > > and the fields are specified as follows: > inside the template-tag: > {{{field|hiddenField|mandatory|hidden}}} > > The value for the first form is simply set with the formtag using > {{PAGENAME}}. > > Does anyone know a solution to my problem? > > kind regards, > Stefan -- Ihr GMX Postfach immer dabei: die kostenlose GMX Mail App für Android. Komfortabel, sicher und schnell: www.gmx.de/android |
From: Stephan G. <f....@gm...> - 2011-07-13 21:07:22
|
Hi, Am 13.07.2011 22:25, schrieb Van de Bugger: > I managed to create two parser functions, {{#link:}} and {{#query:}}. > The first one allows creating a link with query string ({{#formlink:}} > also allows it, but creates links to forms only, while my {{#link:}} is > a bit more general), the second one allows retrieving a parameter from > query string. I did some experiments with these functions. These Sounds like the UrlGetParameters extension [1]. > Another approach I am going to try is using jQuery (for the Form 1), but > for now I have only rough idea, not yet even implemented. If you want to go that way, maybe have a look at SF_submit.js. There should be a PHP-only way, though. Stephan [1] http://www.mediawiki.org/wiki/Extension:UrlGetParameters |
From: Van de B. <van...@gm...> - 2011-07-15 20:17:50
|
Yes, I knew it. Thanks. On Fri, 2011-07-15 at 21:31 +0200, Stephan Gambke wrote: > Hi, > > you could just use the one-step process [1]. > > Without knowing your particular wiki it seems more straightforward and > user-friendly to me. > > You could pass the name of your parent region to your form like this: > > {{#formlink:form=Region|linkt text=Create subregion|query > string=super_page={{FULLPAGENAME}} }}. > > Stephan > > > [1] > http://www.mediawiki.org/wiki/Extension:Semantic_Forms#The_one-step_process > > > > > Am 15.07.2011 20:33, schrieb Van de Bugger: > > Hi, > > > > The goal is to create few linked forms, not pages. > > > > I my database I have "region" object. All the regions are organized > > hierarchically as subpages. If region A belongs to region B, A is a > > subpage of B, fullname of A would be B/A. > > > > I want a link "Create subregion" on every region page. I can put > > "forminput" to every region page, it works perfect. But looks not so > > good. A single input field looks on on the form, but single input field > > in the middle of page full of text looks a bit ugly. I would like to > > have link "Create subregion", not input field. |
From: badon <fas...@gm...> - 2011-08-24 01:42:11
|
It sounds like this problem can be generalized, into a new feature request for semantic forms. How about "branching forms"?: https://bugzilla.wikimedia.org/show_bug.cgi?id=30536 Van de Bugger wrote: > > Yes, I knew it. Thanks. > > On Fri, 2011-07-15 at 21:31 +0200, Stephan Gambke wrote: >> Hi, >> >> you could just use the one-step process [1]. >> >> Without knowing your particular wiki it seems more straightforward and >> user-friendly to me. >> >> You could pass the name of your parent region to your form like this: >> >> {{#formlink:form=Region|linkt text=Create subregion|query >> string=super_page={{FULLPAGENAME}} }}. >> >> Stephan >> >> >> [1] >> http://www.mediawiki.org/wiki/Extension:Semantic_Forms#The_one-step_process >> >> >> >> >> Am 15.07.2011 20:33, schrieb Van de Bugger: >> > Hi, >> > >> > The goal is to create few linked forms, not pages. >> > >> > I my database I have "region" object. All the regions are organized >> > hierarchically as subpages. If region A belongs to region B, A is a >> > subpage of B, fullname of A would be B/A. >> > >> > I want a link "Create subregion" on every region page. I can put >> > "forminput" to every region page, it works perfect. But looks not so >> > good. A single input field looks on on the form, but single input field >> > in the middle of page full of text looks a bit ugly. I would like to >> > have link "Create subregion", not input field. > > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > -- View this message in context: http://old.nabble.com/Nested-Forms-tp32052038p32323367.html Sent from the Semantic Mediawiki - User mailing list archive at Nabble.com. |
From: Stefan S. <mo...@gm...> - 2011-07-13 10:27:26
|
Mh, another idea was to pass parameters in the url, does this work? regards, Stefan On Wed, 2011-07-13 at 12:00 +0200, Stephan Gambke wrote: > Hi Stefan, > > it certainly belongs here. > > If I understand you right, you want to chain forms. This is not possible with current versions of SF. The next best thing might be using HeaderTabs [1]. > > Cheers, > Stephan > > > [1] http://www.mediawiki.org/wiki/Extension:HeaderTabs > > > -------- Original-Nachricht -------- > > Datum: Wed, 13 Jul 2011 11:04:29 +0200 > > Von: Stefan Schupp <mo...@gm...> > > An: sem...@li... > > Betreff: [Semediawiki-user] Nested Forms > > > Hi, > > > > I don't exactly know, whether this belongs here, but is there a way to > > create nested forms? To be precisely, I want to call a first form from a > > page, giving it as a hidden field the pagename, where I came from. This > > first form contains a formlink to a second form, which I want to give > > again hidden fields, such that I can redirect back to the first form > > whithout losing the entered values. > > How can I pass the values of certain fields to other fields from form to > > form? > > I tried something similar to this: > > {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfield1]| > > ...}} > > > > and the fields are specified as follows: > > inside the template-tag: > > {{{field|hiddenField|mandatory|hidden}}} > > > > The value for the first form is simply set with the formtag using > > {{PAGENAME}}. > > > > Does anyone know a solution to my problem? > > > > kind regards, > > Stefan > |
From: Stephan G. <f....@gm...> - 2011-07-13 11:23:47
|
Let's try to sort it out. If I understood you right, you want to do something like this: SomePage -> Form1 -> Form2 -> SomeNewPage There is no problem to prefill a form from a URL. Just do something like this: http://foo.com/wiki/Special:FormEdit/YourForm/YourTargetPage?SomeTemplateName[SomeParameter]=SomeValue The problem is that there is no way to dynamically collect the values of a form and construct a link from them. This means you can easily do the part SomePage -> Form1, but you will run into problems on Form1 -> Form2. Stephan -------- Original-Nachricht -------- > Datum: Wed, 13 Jul 2011 12:27:15 +0200 > Von: Stefan Schupp <mo...@gm...> > An: Stephan Gambke <f....@gm...>, sem...@li... > Betreff: Re: [Semediawiki-user] Nested Forms > Mh, another idea was to pass parameters in the url, does this work? > > regards, > Stefan > > On Wed, 2011-07-13 at 12:00 +0200, Stephan Gambke wrote: > > Hi Stefan, > > > > it certainly belongs here. > > > > If I understand you right, you want to chain forms. This is not possible > with current versions of SF. The next best thing might be using HeaderTabs > [1]. > > > > Cheers, > > Stephan > > > > > > [1] http://www.mediawiki.org/wiki/Extension:HeaderTabs > > > > > > -------- Original-Nachricht -------- > > > Datum: Wed, 13 Jul 2011 11:04:29 +0200 > > > Von: Stefan Schupp <mo...@gm...> > > > An: sem...@li... > > > Betreff: [Semediawiki-user] Nested Forms > > > > > Hi, > > > > > > I don't exactly know, whether this belongs here, but is there a way to > > > create nested forms? To be precisely, I want to call a first form from > a > > > page, giving it as a hidden field the pagename, where I came from. > This > > > first form contains a formlink to a second form, which I want to give > > > again hidden fields, such that I can redirect back to the first form > > > whithout losing the entered values. > > > How can I pass the values of certain fields to other fields from form > to > > > form? > > > I tried something similar to this: > > > > {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfield1]| > > > ...}} > > > > > > and the fields are specified as follows: > > > inside the template-tag: > > > {{{field|hiddenField|mandatory|hidden}}} > > > > > > The value for the first form is simply set with the formtag using > > > {{PAGENAME}}. > > > > > > Does anyone know a solution to my problem? > > > > > > kind regards, > > > Stefan > > > > -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de |
From: trueskew <tru...@gm...> - 2011-07-13 16:01:23
|
I know what you're talking about. You'd might event want to go back to the previous form in some cases. I've got a few lower priority use cases that could use a wizard interface. When I finally need it, I'm going to play with showing / hiding portions of a form to make it seem like successive forms... it could even work as a "jump to step X" interface that way. That method has problems though... for instance, mandatory field on page 3 is missing, but you're saving on page 5, how do you show it?. But there are cases where it should work fine. -----Original Message----- From: Stefan Schupp [mailto:mo...@gm...] Sent: Wednesday, July 13, 2011 2:04 AM To: sem...@li... Subject: [Semediawiki-user] Nested Forms Hi, I don't exactly know, whether this belongs here, but is there a way to create nested forms? To be precisely, I want to call a first form from a page, giving it as a hidden field the pagename, where I came from. This first form contains a formlink to a second form, which I want to give again hidden fields, such that I can redirect back to the first form whithout losing the entered values. How can I pass the values of certain fields to other fields from form to form? I tried something similar to this: {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfiel d1]| ...}} and the fields are specified as follows: inside the template-tag: {{{field|hiddenField|mandatory|hidden}}} The value for the first form is simply set with the formtag using {{PAGENAME}}. Does anyone know a solution to my problem? kind regards, Stefan ---------------------------------------------------------------------------- -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Semediawiki-user mailing list Sem...@li... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
From: Van de B. <van...@gm...> - 2011-07-13 20:25:57
|
Hi, I wanted to implement such a scheme (Some page -> Form 1 -> Form 2) too, but for now I have no success. I managed to create two parser functions, {{#link:}} and {{#query:}}. The first one allows creating a link with query string ({{#formlink:}} also allows it, but creates links to forms only, while my {{#link:}} is a bit more general), the second one allows retrieving a parameter from query string. I did some experiments with these functions. These functions allows transitions Some page -> Form 1 -> Form 2 with passing address of Some page to Form 2. Sometimes the scheme works perfectly, but sometimes the scheme "gets stuck" or "frozen": Form 2 gets exactly the same "Some page" independently on actual starting point. I think the reason is caching done by either MediaWiki or Semantic Forms, but I am not sure. I am planning to try something like Extension:MagicNoCache to disable caching for Form 1, but did not experimented with caching yet. Another approach I am going to try is using jQuery (for the Form 1), but for now I have only rough idea, not yet even implemented. Van. On Wed, 2011-07-13 at 13:23 +0200, Stephan Gambke wrote: > Let's try to sort it out. If I understood you right, you want to do something like this: SomePage -> Form1 -> Form2 -> SomeNewPage > > There is no problem to prefill a form from a URL. Just do something like this: > > http://foo.com/wiki/Special:FormEdit/YourForm/YourTargetPage?SomeTemplateName[SomeParameter]=SomeValue > > The problem is that there is no way to dynamically collect the values of a form and construct a link from them. > > This means you can easily do the part SomePage -> Form1, but you will run into problems on Form1 -> Form2. > > Stephan > > > -------- Original-Nachricht -------- > > Datum: Wed, 13 Jul 2011 12:27:15 +0200 > > Von: Stefan Schupp <mo...@gm...> > > An: Stephan Gambke <f....@gm...>, sem...@li... > > Betreff: Re: [Semediawiki-user] Nested Forms > > > Mh, another idea was to pass parameters in the url, does this work? > > > > regards, > > Stefan > > > > On Wed, 2011-07-13 at 12:00 +0200, Stephan Gambke wrote: > > > Hi Stefan, > > > > > > it certainly belongs here. > > > > > > If I understand you right, you want to chain forms. This is not possible > > with current versions of SF. The next best thing might be using HeaderTabs > > [1]. > > > > > > Cheers, > > > Stephan > > > > > > > > > [1] http://www.mediawiki.org/wiki/Extension:HeaderTabs > > > > > > > > > -------- Original-Nachricht -------- > > > > Datum: Wed, 13 Jul 2011 11:04:29 +0200 > > > > Von: Stefan Schupp <mo...@gm...> > > > > An: sem...@li... > > > > Betreff: [Semediawiki-user] Nested Forms > > > > > > > Hi, > > > > > > > > I don't exactly know, whether this belongs here, but is there a way to > > > > create nested forms? To be precisely, I want to call a first form from > > a > > > > page, giving it as a hidden field the pagename, where I came from. > > This > > > > first form contains a formlink to a second form, which I want to give > > > > again hidden fields, such that I can redirect back to the first form > > > > whithout losing the entered values. > > > > How can I pass the values of certain fields to other fields from form > > to > > > > form? > > > > I tried something similar to this: > > > > > > {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfield1]| > > > > ...}} > > > > > > > > and the fields are specified as follows: > > > > inside the template-tag: > > > > {{{field|hiddenField|mandatory|hidden}}} > > > > > > > > The value for the first form is simply set with the formtag using > > > > {{PAGENAME}}. > > > > > > > > Does anyone know a solution to my problem? > > > > > > > > kind regards, > > > > Stefan > > > > > > > > |
From: Yaron K. <ya...@wi...> - 2011-07-14 04:04:29
|
Hi, If the goal is to create two or more linked pages, why not have the user start by creating the first page, and then have that page itself contain, via a template, the #formlink or #forminput call(s) necessary to create the following pages? That seems to me like a more straightforward approach, easier to program as well as easier for the user to understand, than having the form links be contained within a form. -Yaron On Wed, Jul 13, 2011 at 5:04 PM, Stephan Gambke <f....@gm...> wrote: > Hi, > > > Am 13.07.2011 22:25, schrieb Van de Bugger: > > I managed to create two parser functions, {{#link:}} and {{#query:}}. > > The first one allows creating a link with query string ({{#formlink:}} > > also allows it, but creates links to forms only, while my {{#link:}} is > > a bit more general), the second one allows retrieving a parameter from > > query string. I did some experiments with these functions. These > > Sounds like the UrlGetParameters extension [1]. > > > > Another approach I am going to try is using jQuery (for the Form 1), but > > for now I have only rough idea, not yet even implemented. > > If you want to go that way, maybe have a look at SF_submit.js. There > should be a PHP-only way, though. > > Stephan > > > [1] http://www.mediawiki.org/wiki/Extension:UrlGetParameters > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- WikiWorks · MediaWiki Consulting · http://wikiworks.com |
From: Van de B. <van...@gm...> - 2011-07-15 18:33:51
|
Hi, The goal is to create few linked forms, not pages. I my database I have "region" object. All the regions are organized hierarchically as subpages. If region A belongs to region B, A is a subpage of B, fullname of A would be B/A. I want a link "Create subregion" on every region page. I can put "forminput" to every region page, it works perfect. But looks not so good. A single input field looks on on the form, but single input field in the middle of page full of text looks a bit ugly. I would like to have link "Create subregion", not input field. This link should target to the mini-form "Region name: [ ]" so user can enter region name to create (without name of parent one!). When user enter the name an push the button "Create or edit" s/he redirected to full-size form of region. This is my scenario. "Some page" is the parent region page, "Form 1" is mini-form to enter name of subregion, "Form 2" is the full-featured region editing form. I need to pass parent region name from "Some page" to "Form 1" to the latter can construct full name of region (parent region/subregion) and pass it to the Form 2. I as wrote before, I have partial success with passing name of parent region via query string. (BTW, thanks for the link to UrlGetParameters, but it does not specify license, so I will stick to my own implementation.) But partial success = no success, because sometimes it stop working (I guess due to caching). Now I am getting familiar with jQuery. Probably I can implement the approach with help of client-side scripts. In contrast to templates, they are executed each time user loads a page, so caching should not be a problem. Van. On Thu, 2011-07-14 at 00:04 -0400, Yaron Koren wrote: > Hi, > > > If the goal is to create two or more linked pages, why not have the > user start by creating the first page, and then have that page itself > contain, via a template, the #formlink or #forminput call(s) necessary > to create the following pages? That seems to me like a more > straightforward approach, easier to program as well as easier for the > user to understand, than having the form links be contained within a > form. > > > -Yaron > > On Wed, Jul 13, 2011 at 5:04 PM, Stephan Gambke <f....@gm...> > wrote: > Hi, > > > Am 13.07.2011 22:25, schrieb Van de Bugger: > > I managed to create two parser functions, {{#link:}} and > {{#query:}}. > > The first one allows creating a link with query string > ({{#formlink:}} > > also allows it, but creates links to forms only, while my > {{#link:}} is > > a bit more general), the second one allows retrieving a > parameter from > > query string. I did some experiments with these functions. > These > > > Sounds like the UrlGetParameters extension [1]. > > > > Another approach I am going to try is using jQuery (for the > Form 1), but > > for now I have only rough idea, not yet even implemented. > > > If you want to go that way, maybe have a look at SF_submit.js. > There > should be a PHP-only way, though. > > Stephan > > > [1] http://www.mediawiki.org/wiki/Extension:UrlGetParameters > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by > Eric > Ries, the creator of the Lean Startup Methodology on "Lean > Startup > Secrets Revealed." This video shows you how to validate your > ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > > > -- > WikiWorks · MediaWiki Consulting · http://wikiworks.com > |
From: Stephan G. <f....@gm...> - 2011-07-15 19:34:09
|
Hi, you could just use the one-step process [1]. Without knowing your particular wiki it seems more straightforward and user-friendly to me. You could pass the name of your parent region to your form like this: {{#formlink:form=Region|linkt text=Create subregion|query string=super_page={{FULLPAGENAME}} }}. Stephan [1] http://www.mediawiki.org/wiki/Extension:Semantic_Forms#The_one-step_process Am 15.07.2011 20:33, schrieb Van de Bugger: > Hi, > > The goal is to create few linked forms, not pages. > > I my database I have "region" object. All the regions are organized > hierarchically as subpages. If region A belongs to region B, A is a > subpage of B, fullname of A would be B/A. > > I want a link "Create subregion" on every region page. I can put > "forminput" to every region page, it works perfect. But looks not so > good. A single input field looks on on the form, but single input field > in the middle of page full of text looks a bit ugly. I would like to > have link "Create subregion", not input field. |
From: badon <fas...@gm...> - 2011-08-21 17:23:40
|
I have a similar case where forms are being used to enter information about objects that have a unique serial number property. When users enter in a new object, I'd like to have a form to check whether there is already an existing object that has the same serial numbers. The serial number property should always be unique. It doesn't seem that SMW or SF explicitly supports unique properties, but I was hoping there's a workaround where form 1 can take the serial number, and then branch either to the existing page containing that property, or to a new form 2 where the rest of the information can be entered in, and the serial number is already prefilled from the previous form. I'm not sure how to do that. It seems that I would need some way to check for the existence of a serial number property with a specific value. That could be done if the serial number property were a page with a redirect to the object's page that has that serial number. But, if that page does not exist, how do I get to form 2? Then, once at form 2, it would have to create both the object page, and the redirected serial number page. Is that possible? Stefan Schupp wrote: > > Hi, > > I don't exactly know, whether this belongs here, but is there a way to > create nested forms? To be precisely, I want to call a first form from a > page, giving it as a hidden field the pagename, where I came from. This > first form contains a formlink to a second form, which I want to give > again hidden fields, such that I can redirect back to the first form > whithout losing the entered values. > How can I pass the values of certain fields to other fields from form to > form? > I tried something similar to this: > {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfield1]| > ...}} > > and the fields are specified as follows: > inside the template-tag: > {{{field|hiddenField|mandatory|hidden}}} > > The value for the first form is simply set with the formtag using > {{PAGENAME}}. > > Does anyone know a solution to my problem? > > kind regards, > Stefan > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > -- View this message in context: http://old.nabble.com/Nested-Forms-tp32052038p32306389.html Sent from the Semantic Mediawiki - User mailing list archive at Nabble.com. |
From: Stefan S. <mo...@gm...> - 2011-08-21 20:24:05
|
As far as I know, if you don't want to explicitly set the unique number, there is support for adding IDs to page names. So if it doesn't matter, which Id is given to a newly created page, you can use the process described in the "one-step-process" part of the semantic forms guide. If you want to select the Id by yourself, you could maybe make use of the parser functions - but I'm not that experienced, so maybe someone with more knowledge here knows whether this is possible. regards, Stefan On Sun, 2011-08-21 at 10:23 -0700, badon wrote: > I have a similar case where forms are being used to enter information about > objects that have a unique serial number property. When users enter in a new > object, I'd like to have a form to check whether there is already an > existing object that has the same serial numbers. The serial number property > should always be unique. > > It doesn't seem that SMW or SF explicitly supports unique properties, but I > was hoping there's a workaround where form 1 can take the serial number, and > then branch either to the existing page containing that property, or to a > new form 2 where the rest of the information can be entered in, and the > serial number is already prefilled from the previous form. > > I'm not sure how to do that. > > It seems that I would need some way to check for the existence of a serial > number property with a specific value. That could be done if the serial > number property were a page with a redirect to the object's page that has > that serial number. But, if that page does not exist, how do I get to form > 2? > > Then, once at form 2, it would have to create both the object page, and the > redirected serial number page. Is that possible? > > > > > Stefan Schupp wrote: > > > > Hi, > > > > I don't exactly know, whether this belongs here, but is there a way to > > create nested forms? To be precisely, I want to call a first form from a > > page, giving it as a hidden field the pagename, where I came from. This > > first form contains a formlink to a second form, which I want to give > > again hidden fields, such that I can redirect back to the first form > > whithout losing the entered values. > > How can I pass the values of certain fields to other fields from form to > > form? > > I tried something similar to this: > > {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfield1]| > > ...}} > > > > and the fields are specified as follows: > > inside the template-tag: > > {{{field|hiddenField|mandatory|hidden}}} > > > > The value for the first form is simply set with the formtag using > > {{PAGENAME}}. > > > > Does anyone know a solution to my problem? > > > > kind regards, > > Stefan > > > > > > ------------------------------------------------------------------------------ > > AppSumo Presents a FREE Video for the SourceForge Community by Eric > > Ries, the creator of the Lean Startup Methodology on "Lean Startup > > Secrets Revealed." This video shows you how to validate your ideas, > > optimize your ideas and identify your business strategy. > > http://p.sf.net/sfu/appsumosfdev2dev > > _______________________________________________ > > Semediawiki-user mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > > > |
From: badon <fas...@gm...> - 2011-08-21 20:53:57
|
That's an interesting idea that I will study to see if I can use it. I may need to change some things unrelated to this topic that could make use of that info, thank you. In my particular case, the serial numbers are already on the physical real-world object, so I don't have control over what it is. I'll read over the one step process again to see if I can find any clues about how I might achieve my goal of ensuring a serial number only gets entered once, and that it can be checked first before prompting a user to do the work of entering in all the data. Stefan Schupp wrote: > > As far as I know, if you don't want to explicitly set the unique number, > there is support for adding IDs to page names. So if it doesn't matter, > which Id is given to a newly created page, you can use the process > described in the "one-step-process" part of the semantic forms guide. If > you want to select the Id by yourself, you could maybe make use of the > parser functions - but I'm not that experienced, so maybe someone with > more knowledge here knows whether this is possible. > > regards, > Stefan > > On Sun, 2011-08-21 at 10:23 -0700, badon wrote: >> I have a similar case where forms are being used to enter information >> about >> objects that have a unique serial number property. When users enter in a >> new >> object, I'd like to have a form to check whether there is already an >> existing object that has the same serial numbers. The serial number >> property >> should always be unique. >> >> It doesn't seem that SMW or SF explicitly supports unique properties, but >> I >> was hoping there's a workaround where form 1 can take the serial number, >> and >> then branch either to the existing page containing that property, or to a >> new form 2 where the rest of the information can be entered in, and the >> serial number is already prefilled from the previous form. >> >> I'm not sure how to do that. >> >> It seems that I would need some way to check for the existence of a >> serial >> number property with a specific value. That could be done if the serial >> number property were a page with a redirect to the object's page that has >> that serial number. But, if that page does not exist, how do I get to >> form >> 2? >> >> Then, once at form 2, it would have to create both the object page, and >> the >> redirected serial number page. Is that possible? >> >> >> >> >> Stefan Schupp wrote: >> > >> > Hi, >> > >> > I don't exactly know, whether this belongs here, but is there a way to >> > create nested forms? To be precisely, I want to call a first form from >> a >> > page, giving it as a hidden field the pagename, where I came from. This >> > first form contains a formlink to a second form, which I want to give >> > again hidden fields, such that I can redirect back to the first form >> > whithout losing the entered values. >> > How can I pass the values of certain fields to other fields from form >> to >> > form? >> > I tried something similar to this: >> > >> {{#formlink:form=form2?Form2Template[hiddenField1]=<Form1Template[hiddenfield1]| >> > ...}} >> > >> > and the fields are specified as follows: >> > inside the template-tag: >> > {{{field|hiddenField|mandatory|hidden}}} >> > >> > The value for the first form is simply set with the formtag using >> > {{PAGENAME}}. >> > >> > Does anyone know a solution to my problem? >> > >> > kind regards, >> > Stefan >> > >> > >> > >> ------------------------------------------------------------------------------ >> > AppSumo Presents a FREE Video for the SourceForge Community by Eric >> > Ries, the creator of the Lean Startup Methodology on "Lean Startup >> > Secrets Revealed." This video shows you how to validate your ideas, >> > optimize your ideas and identify your business strategy. >> > http://p.sf.net/sfu/appsumosfdev2dev >> > _______________________________________________ >> > Semediawiki-user mailing list >> > Sem...@li... >> > https://lists.sourceforge.net/lists/listinfo/semediawiki-user >> > >> > >> > > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > -- View this message in context: http://old.nabble.com/Nested-Forms-tp32052038p32307171.html Sent from the Semantic Mediawiki - User mailing list archive at Nabble.com. |