Formit Textarea input not sent with the rest of the mail

Hi,

So I am trying to fix the issue that textarea input is not being sent along with my mails.
Everything works except the textarea input that is not being outputted to the e-mail.

Since the Formit documentation does not seem to cover this (at least I am not able to find it on modx.com or externally), I could do with some help. See below my HTML.

<div class="row">
    <div class="medium-12 columns">
        <label for="reaction">[[%customer.reactie]]</label>
        <select id="reaction" name="reaction">
            <option value="[[%customer.e_mailadres]]" [[!+fi.reaction:FormItIsSelected=`[[%customer.e_mailadres]]`]]>[[%customer.e_mailadres]]</option>
            <option value="[[%customer.telefonisch]]" [[!+fi.reaction:FormItIsSelected=`[[%customer.telefonisch]]`]]>[[%customer.telefonisch]]</option>
            <option value="[[%customer.anders]]" [[!+fi.reaction:FormItIsSelected=`[[%customer.anders]]`]]>[[%customer.anders]]
                <textarea form="input" id="textarea" placeholder="Vermeld hier uw voorkeur indien uw keuze [[%customer.anders]] was" class="[[%customer.anders]]" name="reaction1" cols="2" rows="2"></textarea>
            </option>
        </select>
        <!--<textarea form="input" id="textarea" placeholder="Vermeld hier uw voorkeur indien uw keuze [[%customer.anders]] was" class="[[%customer.anders]]" name="reaction" cols="2" rows="2"></textarea>-->
    </div>
</div>

See below my current mail template (the section for this question):

<tr>
    <td width="200"><strong>Preferentie vorm van reactie:</strong></td>
    <td>[[+reaction]][[+reaction1]]</td>
</tr>


Current output in the mail:
image

Expected behaviour: [[+reaction1]] gets filled with the value that people type in the textarea.

Tried:

  1. changing ID’s, names, classes (all seperate but also in combinations of changing them all to 1 value)
  2. Add new placeholder for the value.
  3. Getting it to work with just the single placeholder (the original [[+reaction]]).

Apologies in case the code is a bit messy right now. This is the current state. The original one is unfortunately no longer reversable, due to this project not being a GIT project.

If someone has an idea for this, or knows of any documentation covering this please let me know.

Why does the textarea have a form attribute?

It seems to work if I delete this attributes or make sure that the attribute corresponds to the value of the id-attribute of the form-tag:

<form id="myform" action="[[~[[*id]]]]#myform" method="post"> 
    ....
</form>
<textarea form="myform" ... ></textarea>
1 Like

Why does the textarea have a form attribute?

Good question. I am not even sure why it is in there. Might have snuck in when I checked w3schools at some point when I could not get it to work.

image
Knowing myself I probably added that form attribute ''just to see if that might make it work" and forgot to remove it afterwards.

But this is the solution. So thank you very much for taking my blindfold off.

Thank you again, and apologies for being my #rubberduck!