Support » Plugin: Participants Database » Problem with textarea and tags

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author xnau webdesign


    Textarea fields don’t normally add line breaks or paragraph tags. You don’t say where you see these things, probably those tags aren’t stored in the database. Usually it’s the theme that is adding them to the content when the field is displayed.

    I just saw now that’s the problem is Insert PHP plugin, maybe doesn’t escape correctly the tags.

    My code is:

    global $current_user;
    if(Participants_Db::get_record_id_by_term(‘user_login’, $current_user->user_login, true)){
    echo do_shortcode(‘[pdb_record record_id=”‘ . Participants_Db::get_record_id_by_term(‘user_login’, $current_user->user_login, true) . ‘”]’);

    Do yo see any error?

    Plugin Author xnau webdesign


    No, there is no error there. The issue happens when the content of the page is displayed, and the theme (or plugin) adds automatic formatting.

    The problem is in the do_shortcode.

    Paragraph and line break tags appear with:

    echo do_shortcode(‘[pdb_record template=bootstrap record_id=”‘ . Participants_Db::get_record_id_by_term(‘user_login’, $current_user->user_login, true) . ‘”]’);

    using the same code of:

    But it’s ok with:

    echo ‘[pdb_record record_id=”17″]’;

    Obviously, i want to have user id.

    It doesn’t matter the template and other plugins.

    Plugin Author xnau webdesign


    If you can use echo '[pdb_record record_id="17"]'; and get content from the plugin, then the PHP plugin must be processing it’s output through the “do_shortcode” filter. It probably shouldn’t do that, it will give you the kinds of problems you’re seeing.

    However, since it’s doing that, have you tried something like:

    echo '[pdb_record record_id=' . Participants_Db::get_record_id_by_term('user_login', $current_user->user_login, true) . ' ]';

    It works!!!!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with textarea and tags’ is closed to new replies.