Skip to:
Content
Pages
Categories
Search
Top
Bottom

placeholder text in new topic form


  • devansh1995
    Participant

    @devansh1995

    hello all,

    i was able to add a placeholder text using below in reply form

    add_filter( ‘bbp_get_the_content’, ‘amend_reply’, 10, 3);

    Function amend_reply ($output, $args, $post_content) {
    if ($args[‘context’] == ‘reply’ && $post_content == ”) $output=str_replace(‘></textarea>’, ‘placeholder=”If you are attaching media, please wait for few seconds as media uploads after clicking submit button. Do not click on refresh or back button. Depending on media size, upload time will depend.” ></textarea>’,$output) ;
    return $output ;
    }

    however i don’t how to do this for new topic form. please help me.

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robin W
    Moderator

    @robin-w

    try changing the argument line

    if (($args['context'] == 'reply' || $args['context'] == 'topic') && $post_content == '') $output....etc.


    devansh1995
    Participant

    @devansh1995

    hey robin .. nice to see you man. in past weeks i went through lot of bbprees forum topics & found your comments so useful. Even above code that i shared is suggested by you only years ago. Thanks a lot again. it worked like a charm. God bless man.


    Robin W
    Moderator

    @robin-w

    great – glad you ae fixed and thanks for your kind comments!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar