From: Yaron K. <ya...@wi...> - 2013-07-24 21:25:27
|
Hi Pierre, Yes - unfortunately, "show on select" can't be used for that purpose; you can't have two or more different {{{field}}} tags for the same field, and then only show one of them depending on other inputs. It's too bad, because it would be useful for a lot of applications, but I looked into it and it appeared to be difficult to implement. One option is to instead have different fields, that set the same property - that may or may not be useful for your specific case, which looks like some sort of meta-form. -Yaron On Wed, Jul 24, 2013 at 4:52 PM, Pierre Racine <Pie...@sb...>wrote: > Hi, > > As suggested in this post: > > > http://wikimedia.7.x6.nabble.com/Example-of-quot-values-dependent-on-quot-in-Semantic-Forms-td4961453.html > > I try to use "show on select" to have a dropdown to display different > values depending on the value set for another dropdown. > > My form code look like this: > > {{{for template|PropertyTest}}} > {{{field|PropertyType|input type=dropdown|values=Boolean,Code|existing > values only|show on select=Boolean=>showboolean;Code=>showcode}}} > > <div id="showboolean"> > {{{field|PropertyInputType|input > type=dropdown|values=checkbox,dropdown,radiobutton|existing values only}}} > </div> > > <div id="showcode"> > {{{field|PropertyInputType|input > type=dropdown|values=textarea,text|existing values only}}} > </div> > > {{{end template}}} > > I face two problems: > > 1) PropertyInputType gets listed two times in the saved page: > > {{PropertyTest > |PropertyType=Code > |PropertyInputType=text > |PropertyInputType=text > }} > > Seems to me that only values for displayed form fields should be saved in > the page. As there is always only one field displayed, there would be > always only one value saved. > > 2) When I set the first dropdown to Boolean and I "Edit with form" again, > the right value for the second field display properly. However, whenever I > set the first dropdown to Code and set a value for the second dropdown, > save and "Edit with form" again, no value get displayed in the second > dropdown. > > I don't know if this is related to the first problem... > > Too bad because the "show on select" option enable so much flexibility... > > Thanks for any help. > Pierre > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- WikiWorks · MediaWiki Consulting · http://wikiworks.com |