BuddyDev

Search

[Resolved] Remove the subject line requirement in messages?

  • Participant
    Level: Guru
    Posts: 995
    calu on #18958

    What I mean is that, the Subject field is not showing “Some message subject” as expected.

  • Participant
    Level: Guru
    Posts: 995
    calu on #18960
    This reply has been marked as private.
  • Participant
    Level: Guru
    Posts: 995
    calu on #19010

    Hi Brajesh, I contacted the theme developer, who returned this wrap for the custom code, but no luck, the subject field is still empty.

    Just to be sure, this code should work?

    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    jQuery(‘#send_message_form’).submit( function() {
    jQuery(‘#subject’).val(“Some message subject”);
    });
    });
    </script>

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 21846
    Brajesh Singh on #19011

    Hi Carsten,
    I have requested @ravisharma to check the code and assist you on this today.

    Regards
    Brajesh

  • Participant
    Level: Guru
    Posts: 995
    calu on #19012

    Thanks a lot!

  • Participant
    Level: Initiated
    Posts: 10
    Han on #26097

    hi, i am trying to achieve what Carsten tried. Could anybody help me?

    i tried implementing the script but nothing happens. when a user forgets to enter a subject the return url is without the recipient. very confusing. see video https://youtu.be/BTyOn6bMgQA

    Regards, Han

  • Keymaster
    (BuddyDev Team)
    Posts: 21846
    Brajesh Singh on #26105

    Hi Han,
    This is very much dependent on theme.

    I will suggest asking your theme developer.

    Regards
    Brajesh

  • Participant
    Level: Guru
    Posts: 995
    calu on #28370

    Hi Brajesh, turning back to core BP Messages, it is relevant for me again to get a solution to the auto fill out the Subject field. I never got it to work in Legacy.

    Earlier you wrote:
    “Since it is just 2 lines of code, My suggestion will be to put it in one of the js file provided by theme. Look for a file named buddypress.js and you can put the code inside the dom ready section there. If you are using a custom theme, you may ask there(or check their documents) to see if there is any custom js file supported.”

    I have got an answer from the theme developer about where to add the js:

    “Definitely wouldn’t suggest adding that to the theme’s file as it will be erased during updates.
    Can you check with them to see if it can be added using wp_footer hook?”

    As I understand, this is not done by adding the code to a js folder with a buddypress.js file in my childtheme to solv the erasure issue.

    Would it be possible to add the code using the wp_footer hook as suggested, or which hook should I use?

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 21846
    Brajesh Singh on #28374

    Hi Carsten,
    Like I said earlier, It is very much dependent on the theme.

    For example, if you check demo of our Community Builder theme, we have removed it.

    We will not be able to assist with your theme and will suggest asking your theme developer for the guidance.

    Regards
    Brajesh

  • Participant
    Level: Guru
    Posts: 995
    calu on #28376

    Hi Brajesh, thanks for your quick reply, actually it is my theme developer who is asking, if if this script can be added using the wp_footer hook, which my theme supports

The topic ‘[Resolved] Remove the subject line requirement in messages?’ is closed to new replies.

This topic is: not resolved