* I have fields called "City", "State", and "Company".
* In the "Company" field, I want the available autocomplete values to
include only those "Companies" that are located in the "City" and
"State" that have already been filled in (or chosen from a dropdown)
by the user in the form.
* This assumes that "City" and "State" semantic relations (or
categories) preexist for every "Company."
--Rich
> saw on net where you can add more instances clicking on + button. Example:http://www.zapatec.com/website/main/products/forms/demo.jsp#multiple....
1. Having autocompletes for fields dependent on the value of previous
fields - this is not a bad idea, and in fact Discourse DB does just
such a thing, in the Add Item page (http://discoursedb.org/
add_item.php), for the Topic and Position fields - that form, however,
was programmed separately, and not implemented using Semantic Forms,
and the way it was done is kind of a hack. To do it the real way, I
think you'd have to have Javascript real-time querying and loading of
data from the database, and that kind of stuff is beyond my current
level of knowledge about Javascript/AJAX.
If I can digress, it's features like this that are part of the reason
I keep pushing for adding support for n-ary relations in Semantic
MediaWiki - it's a lot easier to handle values that are related to one
another if they're defined as being related to one another. If you
don't know what I'm talking about, see this page -
http://ontoworld.org/wiki/N-ary_relations - and its corresponding talk
page.
2. Being able to select more than one value in dropdown menus - I
don't see any real value in this.
3. A Javascript implementation of adding/removing multiple fields -
this is great, and I had been looking for something just like this.
Hopefully there's a way to easily copy the Javascript over to the
Semantic Forms code - anyone want to take a look at it? :)
-Yaron
There are a lot of ideas here... let's see if we can split them up:
1. Having autocompletes for fields dependent on the value of previous
fields - this is not a bad idea, and in fact Discourse DB does just
such a thing, in the Add Item page ( http://discoursedb.org/
- I think a discussion of creating an API is very premature - for one
thing, I don't believe there's been any issue yet on which there's
been a serious disagreement over how to proceed. If someone wants to
add a capability, it might as well get added to the general code base.
- I looked more at that "Zapatec" Ajax example, and unfortunately it
turns out that it uses a library (Zapatec) that requires purchase. But
it's a good proof-of-concept of what an Ajax-based interface would
look like. I've been reading up on Ajax, and I don't think it'll be as
hard as I thought it was, using the Prototype library (which is
already in the code base) to add in this kind of functionality.
-Yaron