Tagged: remove subject private message
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
CarstenHi Carsten,
I have requested @ravisharma to check the code and assist you on this today.Regards
Brajeshhi, 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
Hi Han,
This is very much dependent on theme.I will suggest asking your theme developer.
Regards
BrajeshHi 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
CarstenHi 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
The topic ‘[Resolved] Remove the subject line requirement in messages?’ is closed to new replies.