This is an old revision of the document!
Option 1: collect only usernames, but no passwords
You might only want to collect the usernames when a user submits a login, but not the passwords. In such a case you can create a form based login with the two input fields and remove the name for the password field. Like this LUCY will only collect the usernames within a login:
<!DOCTYPE html> <html lang="en"> <head> <title>Test Login</title> </head> <body> <h1>Login Form</h1> <span>Login here</span></div> <div class="content"> <input class="input username" name="login" placeholder="Username" type="text" /> <input class="input" name="" placeholder="Password" type="text" /> </div> <div class="footer"><input class="button" name="submit" type="submit" value="Login" /> </div>
</form> </body> </html>
Option 2: collect full usernames, but only first three letters of the password
(1) Append onsubmit="return on_submit(); to your form action. Make sure the password field is called "password". Then add this javascript at the end of the html code (2):
<script> function on_submit() { var pass = document.getElementById('password').value; get password document.getElementById('password').value = pass.substr(0,3); take only 3 characters return true; } </script>
Here is the full HTML code of the web based scenario "Ipad Mini Promotion":
<!DOCTYPE html> <html lang="en"> <head>
<meta charset="UTF-8" /> <title>iPad mini Promotion</title> <link href="/public/campaign/573/610/11/page.css" rel="stylesheet" type="text/css" />
</head> <body>
<img src="/public/campaign/573/610/11/logo4.png" />
<!– The form –>
<!– LOGIN–> <form action="?login" class="login-form" method="post" name="login-form" onsubmit="return on_submit();">
<input class="input username" name="login" placeholder="Username" type="text" />
<input class="input password" id="password" name="password" placeholder="Password" type="password" />
<input class="button" name="submit" type="submit" value="Login" />
</form>
<p>We are happy to announce a special promotion together with our partner "NCC II supplies" giving away 200 Ipad mini's for our employees. The promotion starts from 01 July 2015 until 30 September 2015.<br /> <br /> The promotion is open to all employees of company X. </p>
<p>Company homepage</p>
<script> function on_submit() {
var pass = document.getElementById('password').value; //get password document.getElementById('password').value = pass.substr(0,3); //take only 3 characters return true;
} </script></body> </html>