Managing Secure Zones

In this article you will learn how to manage your Secure Zones. Before reading this article you will need to have a secure zone created. If you haven't created a secure zone you need to read Creating a Secure Zone and securing your site content article.
 

Granting access to Secure Zones from within the Admin Console

You can create an unlimited number of Secure Zones for every site. Visitors and customers may choose to subscribe to more than one site. Visitors can subscribe in one of two methods:

  • If you've provided a registration form on the site, visitors can register online.
  • Any admin user can manually subscribe existing customers to a Secure Zone using the Admin Console.

To learn how to manually grant access to private areas, see Subscribing users with access to a password-protected Secure Zone.

Building a registration form to enable subscribers to register to a Secure Zone online

You may choose to create hidden, orphaned pages in a Secure Zone that are invisible to normal site visitors. For example, you could create a set of pages that are linked to themselves, but are not linked to any other page of the site. Then, the entire set of pages (like a mini-site) can be placed behind a Secure Zone. In this scenario, you could manually subscriber visitors (such as the business's clients) and they would be the only ones who could log in or even know about a Secure Zone.

However, in many cases you may want to advertise the Secure Zone and enable visitors to discover it and subscribe to it online, without requiring an admin user to enable their subscription. That way, the subscription process can be automated and will not require any maintenance. Follow these steps to create a Secure Zone registration form:

  1. Choose Site Manager > Web Forms > Add New Form.


     
  2. The Web Form Details page appears. Enter the name of the new form,  such as Secure zone registration form,  or some other descriptive name. Select the secure zone you wish to subscribe the visitors to from the Secure Zone and click Save. 


     
  3. Select the fields that you want to include in the form. Be sure to include the fields for Username and Password. If you are charging for access,  you'll also want to include the credit card processing information. Some payment gateways also reequire a billing address in order to process online payment transactions; check to see if the payment gateway set up for the site has this requirement. 




    Note: If you wish to add custom fields to the form or setup a notification email you can do so from this page. 
     
  4. Choose Site Manager > Pages. Either select an existing page or create a new page where the form will be inserted. For example,  you can create a new page and name it secure_zone_registration_page.html in the Web Page Details page that appears.


     
  5. Click Add Modules to web page button to launch the Module Manager in the right sidebar. Select Web Forms > Web Form.

  6.  The Module Manager updates to display a menu with the list of existing web forms. Choose the desired form name and click Insert.



    The source code for the form will be inserted at the location where the cursor was last clicked in the page.
     
  7. Edit the form,  as desired,  using the Design or HTML tabs of the online editor. When you are finished,  scroll to the bottom and click Update or Publish. 
     
  8. In a new browser window,  visit the live site. Test the Secure Zone registration form by navigating to the web page that contains the form and then submitting it. Verify that you receive an email message confirming your subscription.

Note: If you are charging for access to a Secure Zone, you can temporarily set the cost for registration to .01 so that your valid credit card is only charged one cent. That way, you can test that the payment gateway is configured correctly to process transactions and the visitors can subscribe online without issues. To learn more about including credit card fields in the form and processing payments, see Charging payment for access to a Secure Zone.

In the next section, you'll learn how to add the login form to the site, to enable subscribers to log into a Secure Zone and access the password-protected content. Once you've added the login form, you can test the site again, to ensure you can successfully log in.

Inserting a login form to enable subscribers to log into a Secure Zone

In order for subscribers to enter their user name and password and access a Secure Zone, you'll need to insert a login form on a web page that is outside of the Secure Zone itself. Follow these steps:

  1. Choose Site Manager > Pages. In the list that appears, select the name of the page you'll use to insert the form. 


     
  2. The Web Page Details page appears. The selected page is displayed in the online editor. Place your cursor at the desired location on the page where you want to insert the form. Click the Module Manager button (blue cross icon) in the toolbar of the online editor to launch the Module Manager.

     
  3. The Module Manager launches in the right sidebar. Choose Secure Zones > Secure Zone Login Form.


     
  4. The Module Manager updates to display a menu with all of the Secure Zones for the site. Use the menu to select the name of the desired Secure Zone, and then click Insert to insert the login form on the page at the location of the cursor.


     
  5. Scroll to the bottom of the page and click Update or Publish to push the updated page live to the hosted servers.

 

Setting the expiration date for a Secure Zone subscription based on a web form submission

 

You can configure the registration form for a Secure Zone to automatically set the expiration date of a Secure Zone membership. For example, if a new subscriber submits a form to register for a free trial access to a Secure Zone, the form can contain the code that will set the subscriber's expiration date in the system.

To set this up, choose Site Manager> Pages. Select the name of the web page that contains the registration form. The Web Page Details page loads, with the form displayed in the online editor. Click the HTML tab to see the source code for the form. 

Edit the source code by adding the line of code below. This line of code creates a field called ZoneExpiry. Enter the date in dd-mmm-yyyy format, as shown below:

<input value="1-Oct-2013" name="ZoneExpiry" id="ExpiryDate" />

In the example shown above, the subscriber's Secure Zone access will expire on 01-October-2013 (October 1st, 2013).

If you'd prefer to have the system generate the expiration date by calculate a number of days from the current date, copy the JavaScript function shown below. This function uses today's date, performs the calculation and inserts the date value into the above field:

function setExpiryDate( )
{
    var dat=new Date();
    dat.setDate(dat.getDate() + 45);
    var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec")
    var pretty = dat.getDate() + "-" + monthname[dat.getMonth()] + "-" + dat.getFullYear();    
    document.getElementById("ExpiryDate").value = pretty;
}




		

The example above enables the Secure Zone membership for 45 days from the date the registration form is submitted. You can edit the value "+45" to change the length of the membership. If you want to grant access for one month, change the number 45 to 30, so that the system will calculate 30 days from the date that the form is submitted before the subscriber's access expires. 

The last step is to modify the form so the function above is triggered as the form is submitted. To do this go into the HTML view on the webpage the form is inserted into and go to the end of the form contents, you will see a bit of JavaScript looking like this: 

 

What you need to do at this point is add the name of the function - setExpiryDate(); just before the theForm.submit(); string like so:

This way just before the form is submitted the function is triggered, the number of days added to the current date and the resulting date is populated into the input field with the ID "ExpiryDate" we previously defined.

 

Publishing case history for users in Secure Zones

If desired, you can publish a subscriber's customer data (the data stored in the site's customer database) inside a Secure Zone. Since only registered subscribers can log in, it is safe to display the information associated with the logged in subscriber's account. This strategy allows customers to access information relating to them easily and securely. For example you can publish all cases for a given customer in a secure zone so that customer can view these, download any related files, and view the message threads.

To learn more review, read Creating and managing customer cases by providing secure customer service areas.

Using the Who's Logged In module

The Who's Logged In module displays the name of the current subscriber that is logged in to a Secure Zone. When a subscriber logs in, this module displays the following text at the location where you inserted the module:

John Citizen Logged in. Log Out.

Otherwise, the following message is displayed:

No one logged in Log in.

To use the module, edit a web page that is inside a Secure Zone. Use the module manager to add it, by choosing Secure Zone > Display who is logged in from the right sidebar. Alternately, you can copy the tag below and paste it into the source code of the page:

{module_whosloggedin}

To add a link to your login web page so that subscribers can log in, insert the following tag:

{module_whosloggedin,/Login.htm}

To learn more about creating a form within a Secure Zone that enables subscribers to update their account information in a Secure Zone, read Updating customer details and pre-populating form fields.

To get instructions to provide support on the site, see Creating and managing customer cases by providing secure customer service areas.