Own Login box

You can easily add your own login box on your company website to facilitate seamless and integrated access for your clients and collaborators.


Own Login box

You can place a login box for your account on your website so that you can ask users to go to your site to log in, rather than to your account login page. Our login script gives you some advanced integration options.

Below you will find the code that can be copied to the code for your site to add the log in box to your website. If you are familiar with basic HTML/CSS it should be easy to style it so that it fits your website look-and-feel.

Filecamp login box in 2 easy steps:

In the following example we assume your filecamp domain is “subdomain.filecamp.com”. You need to change all instances of this domain to your own filecamp domain.


1) Place the login-box container div where ever you want on your webpage

<div id="fc_login"></div>

2) Insert the Filecamp login javascript code

First decide which folder you want your clients to log in to. Simply log in and choose the folder – and copy the url from the address field in the browser. In this example we want our client to login to the following url:
https://subdomain.filecamp.com/files/czqn-51096740/czqn-51096740

We have to add two snippets of javascript code:

  • Insert the Filecamp config object with the login-url in the head section of the page.
  • Near the bottom of the page, just before the end body tag, place the latest Filecamp login script.
<!-- Filecamp config should be placed the head section -->
<script>
var fcg = { 
url:'https://subdomain.filecamp.com/files/czqn-51096740/czqn-51096740'
}
</script>

</head>
<body>

<!-- Call the Filecamp login script just before end body tag -->
<script type="text/javascript" src="https://subdomain.filecamp.com/login/latest.js">
</script>

</body>
</html>

It is important to place the login script before the end of the body and not in the head section, otherwise the login box won’t be loaded before after the page html has finish rendering and browsers won’t offer to remember username and password.

If you are using your own domain for the Filecamp solution, then we strongly advice that you add your Filecamp subdomain as a ‘site’ variable to the config object, as this will ensure login via a secure SSL encrypted url.

<!-- If using your own domain,  add your filecamp subdomain as site variable -->
<script>
var fcg = {
url:'http://your.owndomain.com/files/czqn-51096740/czqn-51096740',
site:'subdomain'
}
</script>

Thats it, you are done!

When you refresh the page, the filecamp login script will look for the div with id=”fc_login” and generate all the login html inside, complete with reset password functionality.

Advanced options

You can customize the text of the login box, by extending the fcg object. I.e. if you want to change language or just make small adjustments. Here is an example with the default values:

<script>
var fcg = {
url:'https://subdomain.filecamp.com/files/czqn-51096740/czqn-51096740',
auto_login: 'Automatic login',
back_login: 'Back to login',
forgot: 'I forgot my password',
email: 'E-mail',
login: 'Login',
title: 'subdomain.filecamp.com',
new_password: 'New password',
password: 'Password',
send: 'Send',
repeat_password: 'Repeat password',
reset: 'Reset',
reset1_header: 'Reset your password',
reset1_text: 'Enter your email and well send you instructions how to reset your password',
reset2_header: 'Choose new password',<br>reset2_text: 'Enter your new password twice to reset...',
username: 'Username'
}
</script>

 

Predefined username (and possibly password)

Some of our users have persistently asked us to allow a predefined username and password, so we have now made that possible as well.

If you add the config value “username_value” then the username field will be automatically filled out with this value. And if you add a “password_value” combined with a “username_value” then both username and password will be filled out with predefined values and the two input fields will be automatically hidden, as will the forgot password link.

<script>
var fcg = {
url:'http://subdomain.filecamp.com/files/czqn-51096740/czqn-51096740', 
username_value: 'myusername',
password_value: 'mypassword'
}
</script>