PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Gravity Forms + CKEditor (WYSIWYG) ... Almost working, except....

  1. Hey Everyone,

    I have a small problem...I spent the last 2 days trying to find a solution but no success so far. So, here it is:

    I managed to partially integrate CKEditor with Gravity Forms. I'm said partially coz the form is not fully working yet. Here's what i did so far...

    After following the guide found here: http://www.gravityhelp.com/forums/topic/post-preview#post-844

    1. I downloaded CKEditor and uploaded it on my server.

    2. Placed this code in the <HEAD> section to load ckeditor.js:

    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>

    3. Used this code to replace the text area with the editor.

    <script type="text/javascript">
    	CKEDITOR.replace( 'input_1_2' );
    </script>

    Here's how the whole code looks on my template:

    <div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1" style="width:900px;height:620px;">  <?php gravity_form(1, true, true, false, '', true); ?>   </div></div>
    
    <a href="#fancyboxID-1" rel="nofollow"><img src="http://<removed>.com/images/<removed>.png" width="244" height="38" border="0" /></a>
    
    <script type="text/javascript">
    	CKEDITOR.replace( 'input_1_2' );
    </script>

    ***** I forgot to say that i use the Easy FancyBox plugin to place the gravity forms in a popup box. This part works great. ******

    Now I have the following 2 problems:

    Problem #1. The editor is not working...I mean it shows up and everything but i can't type anything in it:

    http://img526.imageshack.us/img526/3513/screen1wd.png

    The only way to make it work so it lets me type in the editor is to click the Source Button twice:

    http://img856.imageshack.us/img856/9373/screen2cn.png

    http://img849.imageshack.us/img849/117/screen3gz.png

    After i click the Source button twice (disable and enable the visual editor) i can finally type in the text area:

    http://img24.imageshack.us/img24/5738/screen4l.png

    Problem #2. Having ajax enabled for my form...if i click the submit button on the form, without filling the required fields, the red errors show up but my CKEditor disappears. Take a look:

    http://img201.imageshack.us/img201/1760/screen5kg.png

    I tried using this code to fix this problem but it doesn't work (i placed it after the form's shortcode on my template):

    <script type="text/javascript">
    if (CKEDITOR.instances['input_1_2']) {
    CKEDITOR.remove(CKEDITOR.instances['input_1_2']);
    }
    CKEDITOR.replace( 'input_1_2');
    }
    </script>

    It seems i need to use the above code after the ajax load, but i'm not sure where should i place it exactly.

    That's it!!! I would really appreciate your help....

    I know it's a long post, but i tried to explain everything as clear as possible. Sorry for my bad english. I'm not a native english speaker.

    Hope to hear from you soon.

    Thanks,
    Alin

    Posted 11 years ago on Tuesday August 28, 2012 | Permalink
  2. I can provide link to the page with the form, but only in private. Does GravityHelp have any private messaging feature?

    Posted 11 years ago on Wednesday August 29, 2012 | Permalink
  3. No PM function here. Please email chris@rocketgenius.com to share the link.

    Posted 11 years ago on Wednesday August 29, 2012 | Permalink
  4. Thank you for your reply, Chris. I just sent you an email...Please check!

    Posted 11 years ago on Wednesday August 29, 2012 | Permalink
  5. thefidler
    Member

    I am also having problems with this. Was the problem resolved?

    Posted 11 years ago on Tuesday September 18, 2012 | Permalink
  6. I don't believe I ever received an email from Allen, or if I did, the issue was not successfully resolved. I would have posted the solution here if it was resolved.

    @thefidler - can you post a link to your site please and let us know exactly what you've done and what is not working? Thank you.

    Posted 11 years ago on Tuesday September 18, 2012 | Permalink