Zoo Visitor

User guide

Registration

{exp:zoo_visitor:registration_form}

Prerequisites

Before setting up the registration tag:

  1. Update your guest member group settings to make sure "include members in author lists" is set
  2. Update your visitor channel settings, in the "channel forms" area, to make sure the default status is "guests".

Registration tag parameters

return

This parameter allows you to define where the user is returned to when finishing the registration

return="account/registration/success"

error_handling

Default off, set to “inline” to enable inline error handling.

error_delimiters

Error delimiters of errors when selecting inline error_handling. Each error will be wrapped in this piped parameter error_delimiters=’<span class=”error”>|</span>’

id

css id of the form

class

css class of the form

include_jquery

Included by default, set include_jquery =”no” to use your own copy of jQuery

preserve_checkboxes

Included by default

safecracker_head (EE versions prior to 2.7.0)

Included by default. Adds necessary Javascript to your form. If you don’t require Javascript functionality, set to “no”. In versions higher or equal to 2.7.0. use the include_assets paramter instead http://ellislab.com/expressionengine/user-guide/add-ons/channel/channel_form/#include-assets

Optional safecracker parameters (EE versions prior to 2.7.0)

The following SafeCracker parameters can be used in the registration form tag:

dynamic_title=”[member_firstname] registration” json=”yes” datepicker=”yes” rules:my_field_name=”required|min_length[5]” secure_action secure_return return_X

See the SafeCracker documentation for more details about these parameters

Channel Form parameters (EE versions >= 2.7.0)

See the channel form documentation for available tags http://ellislab.com/expressionengine/user-guide/add-ons/channel/channel_form/#parameters

allowed_groups

When setting the membergroup upon registration, you have to provide the group ids of the allowed member groups as a pipe. allowed_groups=”5|6” Use a field with name “group_id” to select the member group in the registration form. (example provided below)

autologin

When member preferences “Require Member Account Activation?” is set to none, the newly registered member will be logged in automatically. yes/no (default: yes)

Registration tag variables

Error handling variables

The following native member error fields are available when the parameter error_handling=”inline”:

{error:username} {error:screen_name} {error:email} {error:current_password} {error:password} {error:captcha} {error:accept_terms}

Use the following tag for error reporting of other custom channel member fields

{error:your_custom_fieldname}

Display all field errors

{field_errors}{error}{/field_errors}

Registration tag examples

Basic example

   {exp:zoo_visitor:registration_form error_handling="inline" return='account/register/success'}

        Email*: <input id="email" name="email" type="text" value="" />
        {error:email}

        Password*: <input id="password" name="password" type="password" value="" />
        {error:password}

        Confirm password*: <input id="password_confirm" name="password_confirm" type="password" value="" />

        Member firstname: <input id="member_firstname" name="member_firstname" type="text" value="" />
        {error:member_firstname}

        Member lastname: <input id="member_lastname" name="member_lastname" type="text" value="" />
        {error:member_lastname}

        Gender (radiobuttons): {options:member_gender} <input id="member_gender" name="member_gender" type="radio" value="{option_value}" />{option_value} {/options:member_gender}

        Birthday (datepicker): <input id="member_birthday" maxlength="23" name="member_birthday" size="25" type="text" value="" />

        <input class="form-submit" type="submit" value="Register" />

{/exp:zoo_visitor:registration_form}

Choosing membergroup during registration

When allowing to choose the membergroup upon registration, make sure to use the allowed_groups parameter and a field with name “group_id”

    {exp:zoo_visitor:registration_form error_handling="inline" return='account/register/success' allowed_groups="5|6"}

                Select member group:
                <select name="group_id">
                        <option value="5">Group with id 5</option>
                        <option value="6">Group with id 6</option>
                </select>

                Email*: <input id="email" name="email" type="text" value="" />
                {error:email}

                Password*: <input id="password" name="password" type="password" value="" />
                {error:password}

                Confirm password*: <input id="password_confirm" name="password_confirm" type="password" value="" />

                Member firstname: <input id="member_firstname" name="member_firstname" type="text" value="" />
                {error:member_firstname}

                Member lastname: <input id="member_lastname" name="member_lastname" type="text" value="" />
                {error:member_lastname}

                <input class="form-submit" type="submit" value="Register" />

{/exp:zoo_visitor:registration_form}

Working with native member fields

Native custom member fields can be used when integrating with MailChimp/Campaign Monitor subscriptions which are handled by other extensions and depend on native fields.

Native fields like signature, url, locations etc... and custom created member fields can be managed by creating a channel field with the same name prefixed with “member_”. Changes in these channel fields will be reflected in the native fields.

    {exp:zoo_visitor:registration_form error_handling="inline" return='account/register/success'}

                Email*: <input id="email" name="email" type="text" value="" />
                {error:email}

                Password*: <input id="password" name="password" type="password" value="" />
                {error:password}

                Confirm password*: <input id="password_confirm" name="password_confirm" type="password" value="" />

                Member signature: <input name="member_signature" type="text" value="" />
                {error:member_signature}

                Member location: <input name="member_location" type="text" value="" />
                {error:member_location}

                <input class="form-submit" type="submit" value="Register" />

{/exp:zoo_visitor:registration_form}