2009/6/2 Randy Brown <ra...@brownragfilms.com>: > I want the user to type in a form without worrying about markup. OTOH, > I want what's saved on the page to be a Page Text Variable. > > For example, the user types into the textarea associated with the page > text variable MyPTV: > > Line 1 > Line 2 > > And the form saves on the page: > > MyPTV: Line1\\Line2 > > I can do that now with a filter. But since the form starts with the > value of MyPTV as the default, the next time the user uses the form, > he or she will see: > > MyPTV: Line1\\Line2 > > which will be confusing since it includes markup. I want the user to > see two separate lines without markup.
Take a look at <http://www.pmwiki.org/wiki/Cookbook/EditAttributes>. It can read page text variables as well as page attributes and present them as separate edit boxes. It'll also let you define a filter function for your data, and that filter function could check the value of $EnablePost to either replace each \\ with a newline or vice versa. eemeli _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users