Steven Heynderickx wrote on 24 Feb 2010 10:50
this is not a design! Just a question.
It would solve manually adjusting a form after new selection-options are added to a site via new pages that were created.
It would be like choosing only ONE level (by free choice) of the pagepath… yes maybe even the possibilty to add a new selection-item…
So I have two suggestions:
- altering the select-field
- altering the pagepath-field
1 Altering the select-field
The Select-field is designed as follows:
[[form]]
fields:
chose_color:
label: Chose a color
type: select
values:
1: Red
2: Blue
3: Green
4: Black
5: White
[[/form]]
So at this moment the items need to be manualy entered. What if we could do the following?
[[form]]
fields:
chose_color:
label: Chose a color
type: select
category: colors
PARENT: PAGENAME //beeing the root-level dept="1"
[[/form]]
2 Altering the pagepath-field
Current design:
[[form]]
fields:
geo:
type: pagepath
category: sandbox-126-pagepath-location
label: Location
[[/form]]
Possible modification
[[form]]
fields:
geo:
type: pagepath
category: sandbox-126-pagepath-location
label: Location
PARENT: PAGENAME //beeing the root-level dept="1"
[[/form]]
By adding the PARENT-attribute, the pagepath will know that it only needs to show ONE pulldown-selection-box.
As I see how fast the PagePath-generates this kind of information I see the possibilities…
Since it is not so far away from the functionallity of the Pagepath it should be very possible to integrate this I assume…
How about that?
Dont touch simplicity of "select".
We can add 'root' and 'depth' attributes to "pagepath".
What you want to use it in real cases, how much/fast you need it ??
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
For my main website, users upload themes that they have created, which others then download.
If I could restrict pagepath to a depth of just one, I could allow users to choose what type of theme they have created. For this to work as planned, there needs to be only one list (i.e. depth="1") and only administrators should be able to add to or modify the list.
Speed isn't an issue, unless it would take several seconds to load the list. Considering pagepath works at a suitable speed already, and the list would only ever be 5-10 elements long, I doubt speed will be a problem.
Edit: Actually… this wouldn't help much. What I really need is a way to then list themes by type using the ListPages module. A real solution to my problem would be the 'parent' field type — but to restrict users to select from a list of pages to be the parent, not type in the page name manually.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
I don't think it's hard to come up with an application where an automaticly filled selectbox is needed. The question is then does it need to have a "ADD NEW ITEM" at the bottom or not?
If the PagePath will be used for this there will be by default a "ADD NEW ITEM" at the bottom… Maybe this is not wanted.
So I wonder… Do you mean the simplicity of the programming as it is now or the simplicity of the use of this module as a user's point of view… I find what I suggested VERY simple… instead of giving all the possible values I tell the program where to find the values. And the list will always be up to date withe the real situation of the site.
But you are telling me that there is no good scenario for a automated selection list because if users can add new values to the list, the list is doomed to become to long and therefore needs added hierarchy… So the only good solution is a pagepath…
I can follow you, and I have no good arguments against it.
One good reason for this to work would be that if you have several forms on a site where people need to choose somthing from a selection… the source of that selection (if reffered to a category) will be the same for all the forms… They will all be synchronised.
I rest My case, if PagePath gets a limit in depth and a parent… maybe I will be happy, but The PagePath keept suggesting to add a subcategory and this makes it easy for users to wildly create new subcategories.
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
I really do miss clear use cases before proposed solutions, Steven.
If you insist on jumping into technical proposals without following the process I explained to you several times I'll insist on closing and/or deleting your threads…
Portfolio