We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36493
    • 64 Posts
    I have a formit form that creates a resource using Bruno17’s formit2resource (http://modxcms.com/forums/index.php/topic,54204.0.html)

    But it seems to be striping tags from the input before it gets to the formit2resource hook?

    input
    <textarea id="qcontent" class="rtearea" cols="55" rows="7" name="content:required">[[+fi.content]]</textarea>


    formit call
    [[!FormIt?
    	&hooks=`formit2resource,email,redirect`
    	&preHooks=`resource2formit`
    	&resource2formitfields=`parent,pagetitle,content`
    	&emailTpl=`questionEmailChunk`
    	&emailTo=`[email protected]`
    	&redirectTo=`518`
    &redirectParams=`{"act":"question","success":"1"}`
    ]]


    Does anyone know how to get rich text into a formit form and keep it?
      |
      • 4172
      • 5,888 Posts
      If you want to keep modx-tags you can try to modify them before sending your form and recreate them in formit2resource before saving.

      You can assign each Richtexteditor you want to your textarea.
      If you need the full tinyMCE with filemanager and all that see: https://github.com/Bruno17/tinymcefe
      This is the tinYMCE from backend with some small mods.

      To use the filemanager you need to have the permissions for that.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 28215
        • 4,149 Posts
        Try this:
        <textarea id="qcontent" class="rtearea" cols="55" rows="7" name="content:required:allowTags">[[+fi.content]]</textarea>
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com