Developer Forum »
Forms - How to post text value instead of number value for dropdown field?
42 posts


I have a form that contains a dropdown value. Now, when sending the form as an email, the data of the field is posted as a number. I would like to post the text value (the value that the user sees)

The field is defined like this in "Templates":


Under "Definitions", the XML code looks like this for the field:

<Field Id="hvatrengerduhjelptil" Type="DropDownList">
      <Names LCID="1044" Name="Hva trenger du hjelp til?" />
        <Setting Key="Items">
          <Setting Key="1">
            <ValueCsd LCID="1044" Value="Tilbud" />
          <Setting Key="2">
            <ValueCsd LCID="1044" Value="Forespørsel" />
          <Setting Key="3">
            <ValueCsd LCID="1044" Value="Varsel" />
          <Setting Key="4">
            <ValueCsd LCID="1044" Value="Nøkler" />
          <Setting Key="5">
            <ValueCsd LCID="1044" Value="Bestille juletrær" />
          <Setting Key="6">
            <ValueCsd LCID="1044" Value="Vaktmestertjenester" />
          <Setting Key="7">
            <ValueCsd LCID="1044" Value="Kontakt meg" />
        <Setting Key="InitialValue" Value="" />
        <Setting Key="CssClassesLabel" Value="" />
        <Setting Key="InlineStylesLabel" Value="" />
        <Setting Key="InlineStyles" Value="" />
        <Setting Key="CssClasses" Value="" />
        <Setting Key="InlineStylesInvalid" Value="" />
        <Setting Key="CssClassesInvalid" Value="" />

The email template currently looks like this:

[%FIELD:"hvatrengerduhjelptil","TITLE"%]:  [%FIELD:"hvatrengerduhjelptil","DATA"%]
An example result in the email may look like this right now:

Hva trenger du hjelp til?: 


 When I actually would like something like this:

Hva trenger du hjelp til?: 

Bestille juletrær
118 posts

Are you manually editing the templates, or have you checked the "auto" property?

Try to compare the automatic template to your manually edited template.

From what I can see, your template does not look correct.