Hi, On 17 Sep 2015 at 18:36:28, HadleysHope ([email protected](mailto:[email protected])) wrote:
Ok so I have been away and run through the FAQ tutorial. I have to say the app in minutes is by far the easiest way to do it, I honestly started to loose the will to live running through the other method, I can see that xwiki is incredibly incredibly powerful in its flexibility in that way but am glad there is another way to get things done because the learning curve would otherwise be too steep for us to consider using xwiki.
Ok, so I have manged to create two new apps one contains states and cities i.e.
Washington, Tacoma Washington, Seattle Texas,Houston Taxas,Dallas Kansas,Wichita
And one that references the values stored in the first. My question is, is there a way, without coding, that I can select "Washington" in one field and it only displays the cities in Washington in another field.
With Tiki this is accomplished with something called "Dynamic Lists" where it looks at a field (linked, remote) to then populate a list based on another (remote) field.
I think we’re missing a good tutorial to explain how to do this. I’ll see what I can do. I’ll also check if I can quickly come up with an extension to make this simpler by adding a custom type in the AWM palette. FTR here’s what it means: * Create a first app to enter the data (city + state), using 2 fields. Either by using Strings or Static Lists. * Populate this first app by creating the 5 entries you have listed above * Create a second app with a “State” field of type DBList and use the class and field of the first app. Note: do not create a second “City” field * Edit the AWM-generated Class Sheet to add logic to generate the “City” field in the HTML form. Write some JS to get the value entered in the “State” field and do a backend REST query passing the state value (and make it return JSON data). Then generate the <option>s of the <select> based on the returned JSON. Also note that all this logic can be encapsulated in a new custom type for the Palette by using the custom displayer field (which you can’t see in the AWM app since it’s a very advanced field. You need to be in the standard Class editor to see it). So if I can succeed in coding this, I could publish this as an extension on extensions.xwiki.org and you’d be able to install it directly in your wiki using the Extension Manager. I just need to find a few hours to do this ;) (will try). Hope it helps, -Vincent
Thanks again for your help.
-- View this message in context: http://xwiki.475771.n2.nabble.com/Migration-away-from-TikiWiki-Forms-based-q...