# Toggle Page Loading

The Toggle page loading is a function in the [elements](https://docs.apphive.io/apphive-documentacion/reference/funciones/elements) functions which allows to add a page loading to show the user that the app is processing data.

![](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-e7f0fbcd7cfde94f483f467746b31d350a0b65ee%2FCaptura%20de%20Pantalla%202020-02-10%20a%20la\(s\)%2010.28.28.png?alt=media)

{% hint style="info" %}
You can select which loader do you need in the settings page.
{% endhint %}

{% hint style="success" %}
Download loaders in: <https://lottiefiles.com/>
{% endhint %}

### 📥 Entry vars <a href="#entry-vars" id="entry-vars"></a>

* **Only disable:** if you activate the option disable you can turn off the toggle page loading function.
* **Only enable:** if you activate the option enable you can turn on the toggle page loading function.

### 👉 Example. <a href="#examples" id="examples"></a>

![](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-7e86ddc40a5053d4efe43786b6c36d59b42aa374%2Fezgif.com-video-to-gif%20\(15\).gif?alt=media)

#### Activate a toggle page loading

1. Select and element and add a toggle page loading.
2. Activate the option only enable.

#### Activate a Login function

1. Add a [login](https://docs.apphive.io/apphive-documentacion/reference/funciones/users/login) function.
2. Select which element the user will use to write an email.
3. Select which element the user will use to write a password.
4. Open the callbacks on the login.
5. Add another toggle page loading in the successful login.
6. Activate the option only disable.

![Before the user login replace the screen with a home page.](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-f3ec21cc9df9384b552c7a59a43c7c135886d61e%2Fezgif.com-video-to-gif%20\(13\).gif?alt=media)
