Hello folks,<br><br>I'm using the latest stable release. (pmwiki-2.1.27)<br><br>How can I add values to the $InputAttrs array? I tried<br>SDV($InputAttrs[],'onSubmit');<br>... and that destroyed the edit form :)<br>
<br>Then I tried adding new markup like this:<br><br># (:quizform A pageTrue:)<br>Markup('quizform', 'directives', <br> '/\\(:quizform\\s+(\\w)\\s+(\\w+)(.*?):\\)/ei',<br> "<form method='POST' onSubmit=\"return checkAnswer(this,'$1','$2');\">"));<br>
<br>but that broke the page with some 'unexpected <' error, so I had to modify it like this:<br><br># (:quizform A pageTrue:)<br>Markup('quizform', 'directives', <br> '/\\(:quizform\\s+(\\w)\\s+(\\w+)(.*?):\\)/ei',<br>
Keep("<form method='POST' onSubmit=\"return checkAnswer(this,'")."$1".Keep("','")."$2".Keep("');\">"));<br><br>However, this results in a span being added to the second argument:<br>
(:quizform A DefinitionAns:)<br>becomes<br><form method="post" onsubmit="return checkAnswer(this,'A','<span class='wikiword'>DefinitionAns</span>');"><br><br>All I need is a markup that would take two parameters and render like this:<br>
<br><form method="post" onsubmit="return checkAnswer(this,'A','DefinitionAns');"><br><br>Help?<br><br>Thanks,<br>Radu<br>