• Resolved rkingw

    (@rkingwgmailcom)


    Is there a way to turn off the “Text” tab and only use the “Visual” tab in the front end text editor of Buddyforms? I’m not sure I want users adding HTML into their post.
    Thanks,
    Rick

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sven Lehnert

    (@svenl77)

    Hi @

    thanks for your feedback. This is a great feature request. I have created a ticket: https://github.com/BuddyForms/BuddyForms/issues/228

    A solution for now is to use the filter “buddyforms_update_form_content” and strip_tags.

    add_filter( 'buddyforms_update_form_content', 'buddyforms_update_form_content_strip_tags', 3, 10 );

    Example:

    function buddyforms_update_form_content_strip_tags( $content, $form_slug, $post_id ){
        return strip_tags($content);
    }

    You can use the $form_slug to filter if you want to strip_tags only on a special form.

    function buddyforms_update_form_content_strip_tags( $content, $form_slug, $post_id ){
        if($form_slug != 'FORM_SLUG'){
            return $content;
        }
        return strip_tags($content);
    }

    I hope this answer helps you. Please let me know if you have any questions left. I like to help.

    Greetings,
    Sven

    • This reply was modified 6 years, 7 months ago by Sven Lehnert.
    • This reply was modified 6 years, 7 months ago by Sven Lehnert.
    Thread Starter rkingw

    (@rkingwgmailcom)

    Great, thanks Sven. I’ll give it a try.
    Rick

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Turn off the “Text” tab in the front end text editor’ is closed to new replies.