We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10165
    • 129 Posts
    I’ve used a combination of eForm2db and eFormPopulate to fill fields from an existing record id - it’s working but I can’t seem to get the textarea "message" to work

    I’ve set placeholders in my populate snippet:
    $modx->setPlaceholder(’name’, $row[’name’]);
    $modx->setPlaceholder(’email’, $row[’email’]);
    $modx->setPlaceholder(’subject’, $row[’subject’]);
    $modx->setPlaceholder(’message’, $row[’message’]);

    in my form chunk I have all input fields as:
    value="[+name+]" etc..

    and the textarea field as:
    <label for="cfMessage">Message:
    <p><textarea name="message" id="cfMessage" eform="Message:textarea:1">[+message+]</textarea></p></label>

    but not getting anything in the text area?

    any ideas/suggestions greatly appreciated
    thanks
      • 20413
      • 2,877 Posts
      You might have to change the db field from e.g. varchar(255)
      to text. But that shouldn’t stop output. What if you remove the eform validation rule?
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 10165
        • 129 Posts
        thanks for the suggestion mrhaw, I’ve tried removing the "eform="Message:textarea:1" but still not getting anything - the db field is already set to text
          • 10165
          • 129 Posts
          Weird - if I add an extra text input with the same value as the textarea but disable this extra field: ( disabled="disabled" ) it seems to work perfectly

          <label for="cfMessage">Message:
          <p><textarea name="message" id="cfMessage" eform="Message:textarea:1>[+message+]</textarea></p></label>
          <p><input name="message" disabled="disabled" id="cfMessage" type="text" value="[+message+]" eform="Message::1" /></p>

          this gets the placeholder value into the form but as it’s disabled your form then uses the textarea for the update - seems to be working for me..

          (I also added style="hidden")