miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Making some fields obligate in User Registration Form ...

 
Author Ruturaj
Partaker
#1 | Posted: 4 May 2005 11:26 
Hello to all Forum members ;

I'm new to miniBB and I have just installed it on my server. I want to make few fields from User Registration Form as "Necessary" fields.

There are fields like ocupation and location which are , by default , not the necessary fields. How can make these fields necessary (must fill-in) ?? Where should I make these changes ?

Waiting for your reply ...

Author Team
8-)
#2 | Posted: 5 May 2005 11:11 
I think, the best and flexible way is to make the checking by JavaScript.

For example, open templates/user_dataform.html for editing and edit the following:

1) Between <script></script> code, before //--> insert new JavaScript function:

function checkFields(){
var error=false;
if(document.forms['regform'].from.value=='') error=true;
else if(document.forms['regform'].occupation.value=='') error=true;
if(error) alert ('Please, fill in all necessary fields.');
else document.forms['regform'].submit();
}

2) Replace input type=submit in a form by input type=button onClick="JavaScript:checkFields();"

Author Ruturaj
Partaker
#3 | Posted: 6 May 2005 06:31 
Thanks. I'll try this ...

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Making some fields obligate in User Registration Form ...
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑