Important

Okay
  Public Ticket #1571608
Access form content in email template
Closed

Comments

  • ripl started the conversation

    Aaand another ticket. How can I access form data in an email template? I saw the {{var data.message|raw}} notation. What if I have a field labeled "some_field" and want to reuse its content. {{var data.message.some_field}} does not work out. Is there a way to access a single field from the form?

  •  1,319
    Land of replied

    Hello Ripl,

    Have a nice day!

    In the form email template you can access directly the submitted form data by field name:

    {{var data.field_name|raw}}

  • ripl replied

    Unfortunately it does not work for me. I tried the following versions:

    {{var data.field_documentid|raw}}

    {{var data.field_documentid}}

    {{var data.field.documentid|raw}}

    {{var data.field.documentid}}

    {{var data.documentid|raw}}

    {{var data.documentid}}

    Where "documentid" is the Label of a text-field of my form.

  •  1,319
    Land of replied

    Hello Ripl,

    No, The field name is attribute name of input, select, textarea,... html field on the form before submitted.

    However for now the form we are using encode name (field prefix + cid of the field + form id) for there field as this:

    loffield_loflofloflofc3147253450657c517ea82cb5147253474357c518d71f37e147253477157c518f388cc1147253477657c518f8b3b7e2

    We are updating the module to allow input field name as we want and use it in the form. We will release it on next version about 3-4 days on this week.

  • ripl replied

    Can you inform me please as soon as an update has been released?

  •  1,319
    Land of replied

    Hello Ripl,

    We will try to release it on end of today. Then you can input the custom field name as you want.