Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 


       myfreeforum.org Forum Index -> What's new? Announcements!
myff admin

phpbb2: Smarten up your registration/profile forms

http://forum.myfreeforum.org/about19497.html&highlight=

I have simplified the code from that post. Just add to the top of profile_add_body.tpl

Code:

  <script type="text/javascript" src="/js/jquery.js"></script>
  <script type="text/javascript" src="/js/jquery.validate.min.js"></script>

<style type="text/css">
* { font-family: Verdana; font-size: 96%; }
label { width: 10em; float: left; }
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
p { clear: both; }
.submit { margin-left: 12em; }
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
</style>
  <script>
  $(document).ready(function(){

   $(".post").each(function(){
      text = $(this).parent().parent().children(":first-child").html();
     if(text.indexOf("*") > -1)
     {
            $(this).addClass("required");
     }

  });

    $("form").validate();

  });
  </script>


and javascript validation will be added to mandatory fields. This will work with most templates.

       myfreeforum.org Forum Index -> What's new? Announcements!
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum