Ben Miller wrote on 13 Oct 2011 03:09
I'm building a site to track academics through their careers at various universities, and to trace mentor/student relationships between these academics. For simple cases, data forms and a newPage module work well; however, most are not simple cases, and I'm running into problems when I want to add many students to one mentor, or several universities to someone advanced in their career — without cluttering up the form for people who only need one field of each.
What I'd like to see is an "add row" function built into the data forms somehow: an option to insert a button that, when clicked, would duplicate the indicated fields. (There would need to be some kind of suffix added, I guess: student-1, student-2, … student-i.)
Ideally, we would even be able to treat joined fields as a single item for the purposes of this duplication, which would allow users to save, e.g., additional address blocks (name, street, city, state), whether for shipping gifts or, in my case, for university names and locations.
In theory, this should be possible: I've seen advanced search engines do it. But I have no idea what the underlying architecture of the data forms is, despite several hours of combing through the documentation and forums.
Can anyone help me determine whether this is feasible, and how? I'm willing to put in a good amount of time coding and debugging, if you can point me in the right direction.
Thanks!
I am trying to get this done by wikidot, but they don't see their platform as a substitute for a database.
BTW this site is not used very much. This is an interesting wish for the feedback-site where you can post bugs and wished. http://feedback.wikidot.com
I gave up on this wish… there are some workarounds for this problem but they are high-maintenance and not so user-friendly. have a look at the newpage module. it is possible to set a parent and tags for a page-that-is-to-be-created. So in that way you could link several pages. So after having filled out the base-form for the mentor in page-X, you could set a "add-student" on this page with a variable parent (beeing this page-X) so if a student is created starting from this page, it would have this page as a parent and you could then list all the children as students of this mentor. So the creation of a student is a different form. Problems start off course if students are also mentors and so on…
So you can set up a many to many relationship but other relations are HELL on wikidot I think.
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
Thanks for the reply, Steven! I was starting to wonder how active this forum was, but the list of Watchers (and a few September and October updates) made me figure it was worth trying. I'll reply here to try to flesh out my thoughts, and then if you think it's appropriate I'll migrate over to the wishlist as you suggest (with a link back to this conversation). I've used it before, but thought this idea wasn't yet concrete enough to explain succinctly in that space. I'm almost there, I think.
In response to your suggestion: We've got a version of the newpage setup already, but not with the kind of auto-parenting you suggest, because we need the capability for multiple parents: if it were just a matter of students having students, we'd be okay, but the built-in breadcrumbing wouldn't let a student have more than one teacher, which is a problem for us. So instead we've used auto-numbering, so that each node can point to other nodes by number. (I'm also experimenting with using pagetree, also, which further complicates the parenting situation.)
Our current stop-gap is to just have a longish Form with a fixed maximum number of parent/student pointers; you can see the template here. But it's kind of ugly (and, especially, quite long if you're not using the extra slots), and not very growth-friendly (some people we'd want to add already have more than the reasonable maximum we've built in).
What I'd like to do is create a new javascript CSI that would expand on the existing framework for the [[Forms]] module — much like the way James Kanjo has extended the [[newPage]] module here. (Though I'm no James!)
But — despite my best efforts — I haven't been able to find the code that drives the original [[Forms]]. Is there a place I should be looking?
it's difficult to help if your site is closed.
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
I'm so sorry! It was closed because we're not ready to go live yet, but I thought I'd fixed the permissions that so you guys could at least see all the code. What I get for posting at 3:00 in the morning, I guess.
The site is open now. Thanks for continuing to respond!