Developer forum

Forum » Development » New Form Module vs. Old Form Module

New Form Module vs. Old Form Module


Reply
Hi,

In the "Old Form Module" you could pass along a value in your url, which would fill in the value of the specified field: Myformpage.aspx&Eventname=Neverendingstoryoffeaturesdisappearinginnewmodules

This would then on my form page fill the field named "Eventname" with the value "Neverendingstoryoffeaturesdisappearinginnewmodules"

This was very handy when making an event calendar, in which you needed to make simple ticket reservations via an e-mail form.

Is this a forgotten feature or is there something similar in the "New Form Module"???

Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
You can do it but it requires the use of xslt templates. I have taken offset in your example and the following xslt will create a text box with the name of the value of your "Eventname" variable in your URL.

<xsl:template match="item[Field.Systemname='Eventname']" priority="1">
 <xsl:element name="input">
  <xsl:attribute name="type">
   <xsl:text>text</xsl:text>
  </xsl:attribute>
  <xsl:attribute name="name">
   <xsl:value-of select="Field.Systemname" />
  </xsl:attribute>
  <xsl:attribute name="id">
   <xsl:value-of select="Field.Systemname" />
  </xsl:attribute>
  <xsl:attribute name="value">
   <xsl:value-of select="/Template/Server.Request.Eventname" />
  </xsl:attribute>
 </xsl:element>
</xsl:template>

 

You must be logged in to post in the forum