[pmwiki-users] forms markup blues
Radu Luchian
radu at monicsoft.net
Wed Dec 3 22:20:54 CST 2008
Hello folks,
I'm using the latest stable release. (pmwiki-2.1.27)
How can I add values to the $InputAttrs array? I tried
SDV($InputAttrs[],'onSubmit');
... and that destroyed the edit form :)
Then I tried adding new markup like this:
# (:quizform A pageTrue:)
Markup('quizform', 'directives',
'/\\(:quizform\\s+(\\w)\\s+(\\w+)(.*?):\\)/ei',
"<form method='POST' onSubmit=\"return checkAnswer(this,'$1','$2');\">"));
but that broke the page with some 'unexpected <' error, so I had to modify
it like this:
# (:quizform A pageTrue:)
Markup('quizform', 'directives',
'/\\(:quizform\\s+(\\w)\\s+(\\w+)(.*?):\\)/ei',
Keep("<form method='POST' onSubmit=\"return
checkAnswer(this,'")."$1".Keep("','")."$2".Keep("');\">"));
However, this results in a span being added to the second argument:
(:quizform A DefinitionAns:)
becomes
<form method="post" onsubmit="return checkAnswer(this,'A','<span
class='wikiword'>DefinitionAns</span>');">
All I need is a markup that would take two parameters and render like this:
<form method="post" onsubmit="return
checkAnswer(this,'A','DefinitionAns');">
Help?
Thanks,
Radu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20081203/84d5414a/attachment.html
More information about the pmwiki-users
mailing list