Username Password
Bookmark and Share

Tell a Friend HOWTO

Tell A Friend HOWTO

A lot of content managers want to give their visitors the ability to tell a friend about a page or site. This is a relatively easy function to provide, but it is not at all obvious how to do it in WebGUI.The following steps describe how to provide this functionality for your users.

Create a Data Form

The first step is to create a page with a Data Form on it.

  1. Create a page called Tell A Friend.
  2. Add a Data Form to the page.
  3. Title it Tell A Friend.
  4. In the description feel free to put some basic instructions for your users.
  5. Change the acknowledgement field to represent a message for your user, such as Thanks for telling your friend about us.
  6. Select Yes on the Mail data? Property.
  7. Click Save.
  8. Now you should be at the add a field form.
  9. Set Label to Message.
  10. Set Field Name to message.
  11. Set Status to Required.
  12. Set Type to Text Area.
  13. Set Default Value to Hi I just wanted to tell you about this page. ^Env("HTTP_REFERER");
  14. Set What next? to Go back to the page.
  15. Click save.
The ^Env("HTTP_REFERER"); part of the default value is very important. This is what tells WebGUI the URL that should be forwarded to the friend. If you wish to refer users to your web site rather than a particular page then you can simply type your URL there instead of the macro.

NOTE: You'll need your administrator to enable the ^Env(); macro if it is not already enabled.

Now that you have the basic form in place, you need to finish editing it.

First, edit the From field. Set the status to Required. In the default values place this macro: ^User("email"); Just as with the ^Env(); macro, you'll need to get your administrator to enable the ^User(); macro if you want to use this feature. What it will do is automatically fill in the from from field with your users email address if they have entered it in their profile.

Next, edit the To field. Set the status to Required and blank out the default value.

And finally edit the Subject field.Set the status to Required and change the default value to something attention grabbing like Check this out!

Add The Link

To finish this process you need to link to this page. The best way to do this is to add the link to your style. If you wish the link to only appear on certain pages, then you can add it to the wobjects on those pages. Whichever you prefer add a link like this:

<a href="^/;tell_a_friend">Tell A Friend</a>

NOTE: If you prefer, you can certainly change the Tell A Friend text, to something else or even an image.

Data Form Mail Template

To make your tell a friend system a little fancier you may wish to add a new template to the Data Form. We highly recommend it. Create the following Data Form template.

Name: Tell A Friend Email


<tmpl_loop field_loop><tmpl_unless field.isMailField><tmpl_var field.value>


Once you've created the template, assign it as the email template for your data form.


Search | Most Popular | Recent Changes | Wiki Home
© 2018 Plain Black Corporation | All Rights Reserved