close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Web development tutorial

Getting Started with Cookies Toolkit

Tutorial created by Team WebAssist

Categories: Data Bridge, Dreamweaver, Javascript, PHP

rating

Cookies Toolkit allows you to easily create cookies that provide useful services on any web site. Cookies are primarily used to save information that has been entered into form fields.

arrow downRequirements

You will need the following items before starting this tutorial:

  1. Dreamweaver 8 or higher
  2. Cookies Toolkit
  3. Dynamic page (PHP, ASP-JS, ASP-VB, ColdFusion)

arrow downStoring form details

The most common application for Cookies Toolkit is to have the cookie store information that has been entered into a form. For example, provide a cookie to store login details in a form thereby saving your visitors time in the future. This is the scenario that will be used for this portion of the tutorial.

  1. In Dreamweaver, open the Log In page for your site.
If your site does not currently contain a Log In page, but you would like to implement this functionality, check out the SecurityAssist tutorial which integrates with Cookies Toolkit to add this functionality.

Step 1: Creating the Remember Me checkbox

If not already on your Login page, you will want to add a remember checkbox that allows the visitor to specify if they wish their login details to be recorded.

  1. Place your cursor where you wish this checkbox to be placed.
  2. From the forms toolbar, select the Checkbox.

  3. In the ID field, enter rememberme.
  4. When naming your form fields for use with Cookies Toolkit, make sure that you use only alphanumeric characters and underscores (_).
  5. In the Label field, enter Remember Me.
  6. Click OK.

Step 2: Creating you Cookies

First you need to create a cookie for each of the required form fields.

  1. From the Bindings panel, choose Add.
  2. Select WA Cookie Variable.

  3. In the Cookie name field enter uname, for the user name field.
  4. Click OK.
  5. From the Bindings panel, choose Add > WA Cookie Variable.
  6. In the Cookie name field, enter password, for the password field.
  7. Click OK.
  8. From the Bindings panel, choose Add > WA Cookie Variable.
  9. Enter remember in the Cookie name field.
  10. Click OK.
  11. From the Bindings panel, click and drag the uname cookie to the User name form field.

  12. Drag the password cookie to the Password form field.
  13. Select the Remember checkbox.
  14. From the Properties Inspector, choose the Dynamic button.

  15. In the Check if field, choose the Lightning bolt.
  16. Expand the Cookies option, and select the remember cookie.
  17. Click OK.
  18. In the Equal to field, enter 1.
  19. Click OK.

Step 3: Setting the Cookie values

  1. From the Server Behaviors panel, choose Add.
  2. Choose WA Cookies Toolkit > Set Cookie Value.

  3. Select the Trigger lightning bolt.
  4. Expand the form option.
  5. Select the remember me field.

  6. Click OK.
  7. From the Cookie name list, choose the uname cookie.
  8. Leave 30 days as the number of days to save this cookie on a visitor’s machine.
  9. Click the Value lightning bolt.
  10. Select the username form field.

  11. Click OK.
  12. Click OK again.

    Repeat this process for the password field.


  13. From the Server Behaviors panel, choose Add.
  14. Choose WA Cookies Toolkit > Set Cookie Value.
  15. Select the Trigger lightning bolt.
  16. Expand the form option.
  17. Select the remember me field.
  18. Click OK.
  19. From the Cookie name list, choose the password cookie.
  20. Leave 30 days as the number of days to save this cookie on a visitor’s machine.
  21. Click the Value lightning bolt.
  22. Select the userpassword form field.
  23. Click OK.
  24. Click OK again.

    Lastly, repeat the same process, this time for the checkbox.

  25. From the Server Behaviors panel, choose Add.
  26. Choose WA Cookies Toolkit > Set Cookie Value.
  27. Select the Trigger lightning bolt.
  28. Expand the form option.
  29. Select the remember me field.
  30. Click OK.
  31. From the Cookie name list, choose the rememberme cookie.
  32. Leave 30 days as the number of days to save this cookie on a visitor’s machine.
  33. Enter 1 in the Value field.
  34. Click OK.


With this done, you have now applied the remember me checkbox to your form. This same procedure can be used with any form page.

arrow downAdditional Resources

The following resources are available to help you get the most out of this product.

Solution Recipes

The following Solution Recipes are interactive video tutorials to help you better understand how you can use Cookies Toolkit.

  1. How Client-Side Cookies Work
  2. How Server-Side Cookies Work
  3. Remembering Entire Forms
  4. Recalling Login Details
  5. Passing Form Values


Context Sensitive Help Documentation

All WebAssist products include help documentation built into the product. As you progress through any user-interface, choose the Help button to view information for that step.

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments
rating

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.