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 related to the Account control.

Name

A unique identifier for the control.

Name property

The Name 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(){
    //get the email of the logged-in user:
    fd.control('Account1').email;
 });

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