Send Information to Special Billers
Article Topics: Billers, Templates
Many special billers, such as dialers and SMS billers, create random usernames and passwords for members who process transactions through them. By default, they do not receive user input when signing up.
However, you can allow members to supply the special biller with their own user credentials (username, password) by making some modifications to your join template. This sets NATS to pass the member's e-mail address, username, and password to the biller, and create the new member with the provided information.
Modifying Your Template
In order to allow your members to pass their desired user information to a special biller, you will have to edit your join template with the necessary code. This can be found in the Sites Admin.
Navigate to the Sites Admin, select the Tour you are using with your special biller, and navigate to the Templates tab.
Once you are on the Site Templates page, scroll down until you locate the join template, and click the "Actions" button and select the "Customize Template" option.
This will load your join template so that you can modify the code found here. The following section details an example of the code necessary to pass member information to special billers.
Sample Code
In order to add functionality for members to pass their information to a special biller, you will need to modify the join template with the following steps:
Create JavaScript Function
Create the JavaScript function, submitSpecial(). This gets the values from the NATS pre-join form, and assigns those values to the hidden fields in the special biller's join form. This function will be invoked when the special biller's join form is loaded.
This should resemble the following:
function submitSpecial(){
if (document.getElementById("join_username").value==''){
alert('Please provide a username');
return false;}
elseif (document.getElementById("join_password").value==''){
alert('Please provide a password');
return false;}
elseif (document.getElementById("join_email").value==''){
alert('Please provide a email address');
return false;}
else {
document.getElementById("special_username").value = document.getElementById("join_username").value;
document.getElementById("special_password").value = document.getElementById("join_password").value;
document.getElementById("special_email").value = document.getElementById("join_email").value;
document.getElementById("special_form").submit();
}
}Add IDs
Add IDs for the member's username, password, and e-mail address fields in the regular join form. These are used by the JavaScript function to locate the information supplied by the surfer.
You can do this by changing the following default values in your join template:
Locate this code:
<TD class="join_value"><input class="join_input" type="text" name="signup[username:1:6:16:::username_check]" value="{$vars.username}">Change it to the following example:
<input class="join_input" type="text" name="signup[username:1:6:16:::username_check]" id="join_username" value="{$vars.username}">Locate this code:
<TD class="join_value"><input class="join_input" type="text" name="signup[password:1:6:16:::password_check]" value="{$vars.password}">Change it to the following example:
<input class="join_input" type="text" name="signup[password:1:6:16:::password_check]" id="join_password" value="{$vars.password}">Locate this code:
<TD class="join_value"><input class="join_input" type="text" name="signup[email:1:1:128:::email_check]" value="{$vars.email}">Change it to the following example:
<input class="join_input" type="text" name="signup[email:1:6:16:::email_check]" id="join_email" value="{$vars.email}">Add ID Attribute to Join Form
Add the ID attribute to your special biller's join form.
For the example JavaScript code provided, this must be:
<form action="https://enter.mobile.private.com/signup/signup.php" method="POST" id="special_form">Add Hidden Fields
Finally, you will need to add the hidden fields in the special biller's join form.
This can be done with the following code:
<input type="hidden" name="signup[username:1:6:16:::password_check]" id="special_user" value="">
<input type="hidden" name="signup[password:1:6:16:::password_check]" id="special_password" value="">
<input type="hidden" name="signup[email:1:1:128:::email_check]" id="special_email" value="">Save your changes once you have made the provided modifications to your join form template. NATS will now create members using the username, password, and e-mail address they provide when a special biller's join form is submitted.
Last updated
Was this helpful?