PrepopulateQuestionFieldOnFAQClassSheet

Last modified by Vincent Massol on 2006/12/10

Question How do I pre-populate Question field on FAQClassSheet with entry from Create-FAQ-Entry form?
Answer The following mix of velocity and javascript can be used in the FAQClassSheet:

#\if($context.action=="inline")
#\set($newtitle = $request.title)
#\if($newtitle)
#\set($newtitle = $newtitle.replace('"',"'"))
<script type="text/javascript">
var title = "${newtitle}";
&#x7B;pre}
document.forms.edit["XWiki.FAQClass_0_title"].value = title;
&#x7B;/pre}
</script>
#\end
#\end
#\end
Tags:
Created by Caleb James DeLisle on 2005/11/02
   

Get Connected