Dave Damage Posted December 20, 2014 Share Posted December 20, 2014 Hi, I'm a bloody noob to processwire and while I was fooling around, I stumbled upon something, I really can't get my head around: I have a Page Input Field in a template to use it as a Select Field in the backend. I have created hidden pages associated with the field. I would like to assign (or relate or link, I don't know the correct term, sorry) a Integer field to this Page Input Field. As an old RPG'ler, I will try to explain it with this example: I have a template called »Character« with several fields, one of this field is a Page Input Field called »Classes« with the subpages »Barbarian«, »Bard«, »Cleric«, and so on, then there is a Integer field called »Level«. So when I create a character, I would choose one or more of these classes and assign a level to each of them. I know I could simply create subpages with "Barbarian Lvl 1", "Barbarian Lvl 2", "Barbarian Lvl 3" and so on, but I can imagine that there is a much quicker and smarter way. Futhermore is it possible to make Page Input Fields dependable upon each other? I would like to choose a option and then in another Input Field select one of this page's subpages: Thank you much in advance and sorry for my broken english. Link to comment Share on other sites More sharing options...
Dave Damage Posted December 20, 2014 Author Share Posted December 20, 2014 Okay, so I found the solution to my first Problem: Repeater Fields. YAY! Still struggling with the second problem though... Link to comment Share on other sites More sharing options...
Mats Posted December 31, 2014 Share Posted December 31, 2014 Check out Ryans answer beginning with Actually, you can do this (on mobile so i can't see the post id): https://processwire.com/talk/topic/4323-field-dependencies/page-6 1 Link to comment Share on other sites More sharing options...
Macrura Posted December 31, 2014 Share Posted December 31, 2014 instead of using repeaters you could use page table, so you would have your classes page table and then it would popup and you would choose the class and the level; and you would see a clean table of those on the edit page. as far as dependencies - it would be a matter of "show this field if..." Link to comment Share on other sites More sharing options...
Dave Damage Posted December 31, 2014 Author Share Posted December 31, 2014 Thank you for your answers. During the last week I discovered the use of Page Tables and use them in 99.99% of all cases, having dropped Repeaters almost alltogether. The only thing that still bugs me is that that the page structure is sometimes a little bit unorganised, especially if I use numerous Page Tables in one page. But I am working on that problem right now... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now