Also, can the "chooser" also work for additional fields on the CURRENT template (without having to specify yet another template for
every field)? Since SF doesn't support multiple values in the same field (that will automatically appear concatenated from, say,
multiple checkboxes), I need to be able to add multiple fields of the same name for the user to choose multiple options in an
enumeration type, as in various fields on the aformentioned form . (But even then I'll still have a problem getting multiple
same-name fields crammed together in a, say, comma-separated list for my game feature comparison table...<sigh>)
MediaWiki can most indeed certainly support multiple field types in a template. Look at
http://www.mediawiki.org/wiki/Template:Extension which supports comma-separated extension types, for example. But what I'm asking
for isn't theoretical physics, Yaron. I just need multiple fields (they don't even have to have the same name either) to be combined
and separated by a comma, for example. So, if I have break=tables, break1=doors, and break2=lights, I want them all combined as a
single "break=tables, doors, lights" (with the separator/delimiter configurable--in this case ", ").
From: Yaron Koren
Sent: Thursday, August 16, 2007 7:23 AM
For the first issue, I don't understand the request. For the second, unfortunately you're out of luck: it's true that SF doesn't
support multiple inputs populating the same field, but MediaWiki itself doesn't support having more than one field with the same
name per template; that's because the parser would then be confused about which one gets substituted where.
Regarding multiple fields, that's not what I'm saying... I don't WANT the user to HAVE to separate multiple entries with a
comma--that's where the concatenation comes in--where things are COMBINED.
From: Yaron Koren
Sent: Thursday, August 16, 2007 2:21 PM
I've never used DPL, though I'm aware of the functionality. Now I understand - you're asking about creating form elements
dynamically, with some sort of rule. Unfortunately that's not possible, and I don't think adding such functionality would be worth
the extra complexity. You'll have to add the form elements manually.
For the second issue, I had misunderstood your question; I thought you were asking about multiple fields in a template with the same
name. Yes, obviously comma-separated values are allowed, though your specific example seems odd: if you know that there will be at
most three (or however many) "break" fields, why not create a separate text input for each one? Why make the user separate them by
commas in one big text input?
You know, I wanted to do this in my own wiki, too. I was able to solve
the problem by writing a PHP page that registered a MediaWiki hook (an
article save hook). Whenever a new article is created in the Attribute
namespace with the proper category, it dynamically regenerates the
form with the new attribute. This requires writing a few pages of PHP
code, but no modifications to SemanticForms are required.