Customizing your Join Form

Article Topic: Sites, Tours, Cascades, Join Options

NATS offers a great deal of flexibility and customization to the NATS join form. You can customize your Join Form to display join options however you see fit and limit or maximize the information NATS requires on the join page.

For example, you can customize your join form to display join options in different ways or take the minimum information required by NATS.

Editing a Template

To customize your NATS join form, you must edit its template. To do so, go to the Sites Management section of NAT, select the Site that contains the Tour you wish to edit then select the tour. Click on the "Templates" tab and locate the Join Page template labeled "join."

Once you have located it, duplicate your template by clicking the "Actions" button and selecting the "Duplicate Template" button from the dropdown. We recommend that you duplicate your join template so that you can retain your original form if you need to quickly revert to it.

Once you have duplicated your join template, either click the "Actions" button then click "Edit Template" or click the name of the duplicated Join Form to start customizing your Join Form.

Changing Necessary Member Information

NATS allows you to edit your join forms to take any amount of user information you deem necessary, so long as you define the Join Option and Cascade values required by NATS to process payments.

Only Request Email and Password

If you wish to only require the email and password for a signup, you can use the following example for the email check:

input type="text" name="signup[username,email:1:1:128:::email_check]" value="{$vars.email}">

Where the username and email are separated by a comma, which will input the email address as a username.

The section of the Join Form where you request email and password will resemble the following:

<legend>Member Information</legend>
<div class="form_input">
	{if $errors.email}<div class="join_error">{$errors.email}</div>{/if}
	<label class="memberinfo">Email:</label>
	input type="text" name="signup[username,email:1:1:128:::email_check]" value="{$vars.email}">
</div>
<div class="form_input">
	{if $errors.password}<div class="join_error">{$errors.password}</div>{/if}
	<label class="memberinfo">Password:</label>
	<input type="password" name="signup[password:1:6:16:::password_check]" value="{$vars.password}">
</div>

Removing Member Information Requirements

For example, you can remove code from the default Join Page found in your Tour Template such as the following:

<legend>Member Information</legend>
<div class="form_input">
	{if $errors.username}<div class="join_error">{$errors.username}</div>{/if}
	<label class="memberinfo">Username:</label>
	<input type="text" name="signup[username:1:6:16:::username_check]" value="{$vars.username}">
</div>
<div class="form_input">
	{if $errors.password}<div class="join_error">{$errors.password}</div>{/if}
	<label class="memberinfo">Password:</label>
	<input type="password" name="signup[password:1:6:16:::password_check]" value="{$vars.password}">
</div>
<div class="form_input">
	{if $errors.email}<div class="join_error">{$errors.email}</div>{/if}
	<label class="memberinfo">Email:</label>
	<input type="text" name="signup[email:1:1:128:::email_check]" value="{$vars.email}">
</div>

The above code puts the required Username, Password, and E-Mail fields in your NATS join form.

If you wish to use a minimal join form, simply remove the code for each field in your template, making sure to leave the code that pertains to Join Options and Cascades.

Random Usernames and Passwords on Join Forms

Another way to use a minimal join form is to use Random Usernames and Passwords by setting the member's username and password to be automatically generated by NATS. You can do so by inputting the following code:

<input type="hidden" name="signup[random_userpass]" value="10:1:5">
  • The first parameter sets the character length for both the username and password fields.

  • The second parameter can be set to either 0 to allow for uppercase, lowercase letters, and numbers, or 1 to allow only lowercase letters and numbers.

  • The third parameter sets the number of attempts to generate the random username and password.

  • The above example would specify a random username and password that are 10 characters long, allowing only lowercase letters and numbers, over 5 attempts.

On older NATS versions, you can only use this if you want both a random username and a random password generated for the member.

Join Options

Your Join Options will be displayed on your Join Page in the order they appear in the Join Options tab of your Site Overview.

More information on creating Join Options can be found on our How to Create a New Join Option page.

By default, detailed option information such as initial bill amount, initial bill days, rebill amount, and rebill days are only available on Special Join Templates and Gateway Templates.

You can choose to have this information displayed on your normal Join Page by adding the Smarty function {nats_get_option_details} to your Join Template.

This function looks up details for a specified option and stores a list of the details in the {$option_details} Smarty variable where you can then leverage the related Smarty parameters in your Join Template, for example: {$option_details.initial}, {$option_details.initial_days}, {$option_details.rebill}, {$option_details.rebill_days}.

Additional Description Fields to Join Options

We often recommend clients use the provided "Join Form Text" (description) field by placing the desired descriptors between a separator character, such as a pipe: "|", and then leverage the Smarty 'explode' modifier to break this apart on the template for further use.

For example, if "Join Form Text" is set to "description A text here|description B text here|description C text here|description D text here"

You can then explode on "|" when editing your Join Form Template:

{foreach from=$join_options item=option key=key name=member}
{assign var="option_parts" value="|"|explode:$option}

Then you would access via parameters {$option_parts[0]}, {$option_parts[1]}, {$option_parts[2]}, {$option_parts[3]} Where the following would now be set:

{$option_parts[0]} : description A text here
{$option_parts[1]} : description B text here
{$option_parts[2]} : description C text here
{$option_parts[3]} : description D text here

Join Template Variables

Join Template Variables are variables you can use on your Join pages to display additional information regarding your Site.

A list of these variables can be found on the Join Template Variables page.

Site OverviewTour OverviewJoin Option OverviewCascadesTesting your Signup Templates

Last updated

Was this helpful?