Free-Conversant Support / Macro: logonForm
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Macros >> logonForm

Macro: logonForm

Usage:

<!--#logonForm-->

Overview:

Displays a form for logging on to a conversation which uses cookie-based authentication ( the default ).

By default, logging on to a conversation is handled at the the url "http://[yoursite]/logon", however, using this macro, you can place a customized logon form anywhere in your site. By default, the macro uses the "logonForm READONLY" template, however you may create your own template based on this template to customize the appearance of the form. Please make sure you include all the required special macros listed below for the form to operate properly.

Note that you may also customize the appearance of the logon form on the actual /logon page of your site by adding a template attribute to the #logonForm macro in Logon Text preferences at Preferences->Web Server->Logon/Logoff in the admin interface.

See also:

Optional Attributes:

  • template="templateName" : The name of the template that controls the layout of the form. Default: "logonForm READONLY"

Required template macros:

  • <!--#logonUsername--> : Produces the input tag for username. Supports attributes:
    • defaultValue="string" : a default value for the field
    • size="[number]" : length of field display.
    • CSS attributes : class, id
    • Javascript attributes : onfocus, onblur, onchange
  • <!--#logonPassword--> : Produces the input tag for password. Supports attributes:
    • defaultValue="string" : a default value for the field
    • size="[number]" : length of field display.
    • CSS attributes : class, id
    • Javascript attributes : onfocus, onblur, onchange
  • <!--#logonSubmitButton--> : Produces the form submit button. Supports attributes:
    • label="string" : button text, default "Logon".
    • CSS attributes : class, id
    • Javascript attributes : onclick

Optional template macros:

  • <!--#logonMessage--> : Returns an error string for unsuccessful logons. This macro will only produce text when used in a template used on the actual /logon page. It is important to include this macro on templates used on this page, however, or the user will not receive feedback when a logon fails.

Hidden redirect controls:

By default, logon forms post to the /logon page, and will remain there giving the user a confirmation/error message. You may override this behavior and cause the user's browser to be redirected to another page on success or failure of a logon form by including one or both of the following hidden tags:

  • <input type="hidden" name="redirectOnLogonSuccess" value="[url to go to]" /> ; If this tag is included in the template, the user will be redirected to the url specified in the value attribute on a successful logon.
  • <input type="hidden" name="redirectOnLogonFailure" value="[url to go to]" /> ; If this tag is included in the template, the user will be redirected to the url specified in the value attribute on a failed logon. Note that if you use this, the page you redirect to should probably contain some explaination of what might have gone wrong, or the user could get confused and believe they are successfully logged on.

View in DG