Please enable JavaScript to view this site.

iService Forms User Guide

Navigation: Form Commands > $IF

$IF -loggedin

Scroll Prev Top Next More

$IF -loggedin$ checks whether or not the user is logged into iService when loading the form. This is most often used when constructing a login panel for forms that require an agent login.

A simple example of $IF -loggedin$ is shown below.

$if -loggedin$        <- Checks to see if user is logged in

  Welcome $value -loggedin(name)$! <- If user is logged in, we display their name from iService

 

$else$ <- If user is not logged in we ask them to enter their login details

  Please login:<br />

  LoginName: $loginname -id'loginname'$<br /> <- Ask user to enter their login

  Login Password: $loginpassword -id'loginpassword'$<br /> <- Ask for user’s password

$endif$ <- Marks the end of the IF statement

 

 

Related Topics:

$LoginName

$LoginPassword

$Value -loggedin