How to add a hidden value to a form

Topics: General, Troubleshooting
Jun 8, 2011 at 6:51 PM

This should be easy, but I just can't figure out how to add a hidden value with an aiutopopualte of remote_address to the conact form through xslt function.



Jun 8, 2011 at 8:28 PM

Below is C1 Function call markup and an XSLT document that produce a hidden input field with user ip as value. Short video at

<f:functions xmlns:f="">
  <f:function name="Composite.Web.Server.ServerVariable" localname="remote_addr">
    <f:param name="VariableName" value="REMOTE_ADDR" />


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:in="" xmlns="" exclude-result-prefixes="xsl in">
  <xsl:template match="/">
        <!-- markup placed here will be shown in the head section of the rendered page -->
          <input type="hiddden"
                  value="{/in:inputs/in:result[@name='remote_addr']}" />