15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Making some fields obligate in User Registration Form ...

Author Ruturaj
Registered
#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
Registered
#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 ... Top

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

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB