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

Hi, 

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":

[%FIELD:"hvatrengerduhjelptil","FBEGIN"%]
[%FIELD:"hvatrengerduhjelptil","TITLE"%]
[%FIELD:"hvatrengerduhjelptil","CONTROL"%][%FIELD:"hvatrengerduhjelptil","ERROR"%]
[%FIELD:"hvatrengerduhjelptil","FEND"%]

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?" />
      <Settings>
        <Setting Key="Items">
          <Setting Key="1">
            <ValueCsd LCID="1044" Value="Tilbud" />
          </Setting>
          <Setting Key="2">
            <ValueCsd LCID="1044" Value="Forespørsel" />
          </Setting>
          <Setting Key="3">
            <ValueCsd LCID="1044" Value="Varsel" />
          </Setting>
          <Setting Key="4">
            <ValueCsd LCID="1044" Value="Nøkler" />
          </Setting>
          <Setting Key="5">
            <ValueCsd LCID="1044" Value="Bestille juletrær" />
          </Setting>
          <Setting Key="6">
            <ValueCsd LCID="1044" Value="Vaktmestertjenester" />
          </Setting>
          <Setting Key="7">
            <ValueCsd LCID="1044" Value="Kontakt meg" />
          </Setting>
        </Setting>
        <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="" />
      </Settings>
    </Field>

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?: 

5


 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.

 

 

1