Never saw your reply FND.

I was not using a plugin for allowing a macro nested into an html form
and that was my big issue. Also my syntax was not xhtml compliant but
I don't think that would have helped much.

So I wrote my solution as a new macro selectfromlist creating my
dropdownlist from items of a particular tag. I created another one
called htmlify that I use to wrap the rest of my input tags with. Here
they are:

config.macros.selectfromlist = {
  handler: function
(place,macroName,params,wikifier,paramString,tiddler) {
     var prms = paramString.parseParams(null, null, true);
     var name = getParam(prms, "name");
     var list = getParam(prms, "tag");
     var output;
     var tiddlers = store.getTaggedTiddlers(list);
     var nPlugins = tiddlers.length;
        for(var i=0; i<nPlugins; i++) {
                var p = getPluginInfo(tiddlers[i]);
                output += "<option value=\""+p.title+"\">"+p.title+"</
option> ";
        }
     wikify("<html><select name="+name+"> "+output+" </select></
html>",place);
  }
};

config.macros.htmlify = {
  handler: function
(place,macroName,params,wikifier,paramString,tiddler) {
    var parm = params.length > 0 ? params[0] : "world";
    wikify("<html>"+parm+"</html>",place);
  }
};

An example of using both in a tiddly:
|Faction: |<<htmlify '<input name=faction type=text />' >>|
|Morph: |<<selectfromlist name:morph tag:Morph>>|


On Oct 30, 10:55 am, FND <[email protected]> wrote:
> > My test tiddler look like this:
> > <html>
> > <select name=morph><<tiddler DropdownOptionList with: "Morph">></
> > select>
> > </html>
>
> I assume you're using a plugin to allow nesting macro calls in raw HTML
> sections?
>
> > Without the html tags the test tiddler looks fine but doesn't create a
> > dropdown list. With them it results in a blank box.
>
> You probably wanna insert the HTML and SELECT tags once in addition to
> creating an OPTION element per item.
> IIRC, ForEachTiddler offers begin/end parameters for that purpose.
>
> If not, a test case would help:
>      http://tiddlywiki.org/wiki/Troubleshooting
>
> -- F.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to