icon Account

The Account control displays the name and the email of the currently logged-in user. The control is available only for forms with enabled authentication

This page contains a detailed description of the control properties and JavaScript samples, which you can use with this control.

Account control preview

Properties

Here you can find properties available for the Account control.

Name

A unique identifier for the control.

Control's name

The Name property is used in JavaScript to select a specific control.

JavaScript

The Name property allows to work with the control via JavaScript code, like this:

fd.rendered(function(){
    //can access the control using its Name:
    fd.control('Control1');
 });

JavaScript framework

In this section, you can find basic examples of how to work with the control using JavaScript.

If you are not familiar with the JavaScript framework, get started with the JavaScript basics.

Note

The control is only accessible once the form is rendered, so all calls to the control must be inside fd.rendered event:

fd.rendered(function(){
    //gt user's email
    fd.control('Control0').email
});

Get user’s name

Get the name of the currently logged-in user:

//return user's name as a string
fd.control('Control0').displayName

Get user’s email

Get the email of the currently logged-in user:

//return user's name as a string
fd.control('Control0').email