Extension:PostForm/PostForm.xsl

PostForm.xsl
    document.getElementById('formsenttext').scrollIntoView(true);       

 #F3F3F3<xsl:otherwise>#F0F0F0</xsl:otherwise></xsl:choose></xsl:attribute> <td width="50%"> <xsl:value-of select="@title" disable-output-escaping="yes"/> <xsl:call-template name="ifreq"/> <input type="file" name="userfile" title="{@title}" class="text" style="width: 320px"/> </xsl:template>

 <xsl:attribute name="bgcolor"><xsl:choose><xsl:when test="position mod 2 = 0">#F3F3F3</xsl:when><xsl:otherwise>#F0F0F0</xsl:otherwise></xsl:choose></xsl:attribute> <td width="50%"> <xsl:value-of select="@title" disable-output-escaping="yes"/> <xsl:call-template name="ifreq"/> <input type="text" name="form_{php:function('urlencode',string(@name))}" title="{@title}" value="" class="text" style="width: 350px"> <xsl:if test="./@req"><xsl:attribute name="datafld">req</xsl:attribute></xsl:if> </xsl:template>

 <xsl:attribute name="bgcolor"><xsl:choose><xsl:when test="position mod 2 = 0">#F3F3F3</xsl:when><xsl:otherwise>#F0F0F0</xsl:otherwise></xsl:choose></xsl:attribute> <td width="50%" style="vertical-align: middle;"> <xsl:value-of select="@title" disable-output-escaping="yes"/> <xsl:call-template name="ifreq"/> <textarea name="form_{php:function('urlencode',string(@name))}" title="{@title}" value="" class="text" style="width: 350px; height: 150px"> <xsl:if test="./@req"><xsl:attribute name="datafld">req</xsl:attribute></xsl:if> </xsl:template>

 <xsl:attribute name="bgcolor"><xsl:choose><xsl:when test="position mod 2 = 0">#F3F3F3</xsl:when><xsl:otherwise>#F0F0F0</xsl:otherwise></xsl:choose></xsl:attribute> <td width="50%"> <xsl:value-of select="@title" disable-output-escaping="yes"/> <xsl:call-template name="ifreq"/> <select name="form_{php:function('urlencode',string(@name))}" id="{@title}" class="text" onkeypress="pickup(this, event)" onblur="restorePos(this)"> <xsl:if test="./@req"><xsl:attribute name="datafld">req</xsl:attribute></xsl:if> <xsl:apply-templates select="ioption"/> <xsl:apply-templates select="source/list/item"/> <div id="{@title}_postext" style="display: none;" width="1px"> <div id="{@title}_options" style="display: none;" width="1px"> </xsl:template>

 <option value="{text}"> <xsl:value-of select="text"/> </xsl:template>

 <td colspan="2" align="center" height="30px"> <input type="submit" value="{@title}" class="FormButton"> <xsl:if test="@onclick"> <xsl:attribute name="onclick"><xsl:value-of select="@onclick"/></xsl:attribute> </xsl:if> </xsl:template>

 <xsl:if test="./@req"> *		</xsl:if> </xsl:template>

 <td colspan="2" align="center"> <xsl:value-of select="."/> </xsl:template>

 <xsl:variable name="bgcolor"> <xsl:choose> <xsl:when test="position mod 2 = 0">#F3F3F3</xsl:when> <xsl:otherwise>#F0F0F0</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="@type = 'inline'"> <tr bgcolor="{$bgcolor}"> <td align="left" colspan="2"> <xsl:value-of select="@title"/> </xsl:when> <xsl:otherwise> <tr bgcolor="{$bgcolor}"> <xsl:value-of select="@title"/> <td align="left" valign="absmiddle"> <xsl:for-each select="iradio"> <xsl:call-template name="radiobutton"> <xsl:with-param name="groupname"><xsl:value-of select="php:function('urlencode',string(parent::radiogroup/@name))"/></xsl:with-param> <xsl:with-param name="value"><xsl:value-of select="@value"/></xsl:with-param> <xsl:with-param name="title"><xsl:value-of select="@title"/></xsl:with-param> <xsl:with-param name="checked"> <xsl:choose> <xsl:when test="@checked">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:template>  <xsl:param name="groupname"/> <xsl:param name="value"/> <xsl:param name="title"/> <xsl:param name="checked"/> <input type="radio" name="form_{$groupname}" value="{$value}"> <xsl:if test="$checked = 1"> <xsl:attribute name="checked"/> </xsl:if> <xsl:value-of select="$title"/> </xsl:template>

 <xsl:param name="groupname"/> <xsl:param name="value"/> <xsl:param name="title"/> <xsl:param name="checked"/> <xsl:param name="bgcolor"/> </xsl:template>  <xsl:attribute name="bgcolor"><xsl:choose><xsl:when test="position mod 2 = 0">#F3F3F3</xsl:when><xsl:otherwise>#F0F0F0</xsl:otherwise></xsl:choose></xsl:attribute> <td width="50%"> <xsl:value-of select="@title"/> <td align="left" valign="absmiddle"> <input type="checkbox" name="form_{php:function('urlencode',string(@name))}" value="{@value}"> <xsl:if test="@checked"> <xsl:attribute name="checked"/> </xsl:if> </xsl:template>  <xsl:attribute name="bgcolor"><xsl:choose><xsl:when test="position mod 2 = 0">#F3F3F3</xsl:when><xsl:otherwise>#F0F0F0</xsl:otherwise></xsl:choose></xsl:attribute> <td width="50%"> <xsl:value-of select="@title"/> <input type="hidden" name="form_{php:function('urlencode', 'Begin of group')}" value="{@title}"/> <td align="left" valign="absmiddle"> <xsl:for-each select="icheckbox"> <xsl:call-template name="checkbox"> <xsl:with-param name="title"><xsl:value-of select="@title"/></xsl:with-param> <xsl:with-param name="value"><xsl:value-of select="@value"/></xsl:with-param> <xsl:with-param name="checked"> <xsl:choose> <xsl:when test="@checked">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:for-each> <input type="hidden" name="form_{php:function('urlencode', 'End of group')}" value="{@title}"/> </xsl:template>

 <xsl:param name="title"/> <xsl:param name="value"/> <xsl:param name="checked"/> <input type="checkbox" name="form_{php:function('urlencode',string($title))}" value="{$value}"> <xsl:if test="$checked = 1"> <xsl:attribute name="checked"/> </xsl:if> <xsl:value-of select="$title"/> </xsl:template>

</xsl:stylesheet>