vForums Support > vForums :: Report a Bug :: Resolved Bugs :: > PM subject

PM subject - Posted By Graham (amusedtodeath) on 3rd Jan 08 at 1:50pm
Not necessarily a bug, but when the subject field is left blank when sending a PM, it returns saying that a subject is needed - would it be easier to set it so that if the field is left blank, "no subject" appears in the field?

Just a thought, as i forgot to add a subject a few times recently and it's returned with that message.

Re: PM subject - Posted By Marc (cr0w) on 3rd Jan 08 at 7:47pm
Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*
  4. Send PM's With No Subject by Cr0w
  5. Copyright 2008
  6. Do not repost
  7. */
  8.  
  9. var pForm = document.pm_form;
  10. pForm.onsubmit = function(){
  11. if(pForm.subject.value == "" || pForm.subject.value == null){
  12. var conf = confirm("PM has no subject!\nSend anyway?");
  13. if(conf){
  14. pForm.subject.value = "(no subject)";
  15. return true;
  16. }
  17. else{
  18. return false;
  19. }
  20. }
  21. }
  22. //-->
  23. </script>
 


There ya go. {Wink}

Re: PM subject - Posted By Graham (amusedtodeath) on 3rd Jan 08 at 10:01pm
Oooh, sexy! Good work {Smile}