Username and Password Field |
Username and Password Field |
VaBoi25 |
Feb 9 2017, 11:35 PM
Post
#1
|
Group: Members Posts: 8 Joined: 9-February 17 Member No.: 26,307 |
Hello all,
I am trying to create a login page for my website that requires users to enter a username and password. The password part is where I am getting hung up though. I need the passwords to contain special characters and the use of upper case letters. I am having a hard time finding the HTML code for this setup. Can anyone provide any assistance please? Thanks in advance. |
VaBoi25 |
Feb 10 2017, 10:39 PM
Post
#2
|
Group: Members Posts: 8 Joined: 9-February 17 Member No.: 26,307 |
Hello all,
So, im trying to help a classmate of mine in her Web Design class. It has been a while since I have played with HTML so I was hoping to reach out to you all for some assistance. She is creating her "website" that will not run off of an actual "server". I just wanted to point that out. Her site is only visible to herself and those that she sends the HTML code to. A dummy site if you will. The requirements she needs may be fairly simple to you all. She needs her password field to administer constraints whenever the user enters a string of characters or numbers. More importantly, the password needs to have 7-9 characters, 2 numbers and 1 uppercase letter. In the most simple syntax, how could she accomplish this? I know Javascript is probably the best option, but this is all the help I could give. Any suggestions? I have left the code in the description as well in case anyone needed to see what has been done so far. Thanks in advance. <!DOCTYPE html> <html> <head> <!-- Login Author: Date: Filename: login.htm --> <meta charset="utf-8" /> <title>Login</title> <link rel="stylesheet" href="styles.css" /> <script src="modernizr.custom.65897.js"></script> </head> <body> <header> <h1> Login </h1> </header> <article> <div id="errorMessage"></div> <form action="home.htm"> <fieldset id="deliveryinfo"></fieldset> <label for="userID">UserID</label> <input type="text" id="usernameID" name="userID" /> <label for="passwordinput">Password</label> <input type="password" id="passwordinput" name="password" /> <input type="checkbox" id="rememberinput" name="remember" value="remember" /> <label for="rememberinput" id="rememberlabel">Remember me</label> <fieldset id="submitbutton"> <input type="submit" id="submitBtn" value="Login" /> </fieldset> </form> </article> </body> </html> |
Christian J |
Feb 11 2017, 10:41 AM
Post
#3
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
im trying to help a classmate of mine in her Web Design class. If this is a school assignment it should already indicate which scripting language to use. QUOTE She needs her password field to administer constraints whenever the user enters a string of characters or numbers. More importantly, the password needs to have 7-9 characters, 2 numbers and 1 uppercase letter. In the most simple syntax, how could she accomplish this? This requires a relatively advanced javascript, perhaps together with Regex. Or you might use an INPUT element together with the HTML5 PATTERN attribute and a Regex, but again this is pretty advanced. In either case it's only use would be for form validation, not actual password protection. |
Lo-Fi Version | Time is now: 24th April 2024 - 03:49 AM |