PHPackages                             funo-network/fn.libs.forms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. funo-network/fn.libs.forms

AbandonedArchivedLibrary

funo-network/fn.libs.forms
==========================

https://github.com/FunoNetwork/fn.libs.forms

551PHP

Since Dec 25Pushed 6y ago3 watchersCompare

[ Source](https://github.com/FunoNetwork/fn.libs.forms)[ Packagist](https://packagist.org/packages/funo-network/fn.libs.forms)[ RSS](/packages/funo-network-fnlibsforms/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

fn.libs.forms
=============

[](#fnlibsforms)

A form library for PocketMine-MP, inspired by EasyForms, FormAPI and BlockSniper. **Better name suggestions are welcome**

### TODO

[](#todo)

- Add the remaining elements
- Allow setting a global callback for dropdowns instead of only individual options?

---

### Usage

[](#usage)

You can use this library as a virion or a plugin.

#### Button List Example

[](#button-list-example)

```
$form = new SimpleForm("Servers");

$form->addButton("Hunger Games", function() {
    $player->transfer("hg.example.com");
});

$form->onClose(function() {
    $player->sendMessage("Closed form");
});

$player->sendForm($form);
```

---

### Modal Form Example

[](#modal-form-example)

```
$form = new ModalForm("Reset Account", "Do you wish to delete your account? You will lose all your progress.");
$form->setYesButtonText("Yes");
$form->setNoButtonText("Cancel");
$form->onResponse(function($data) {
    // I cant remember what the data is but yeah
});
```

---

#### Custom Form Example

[](#custom-form-example)

```
$form = new CustomForm("Chat Effects");
$form->addLabel("Customize your chat!\n\n");

$dropdown = $form->addDropdown("Chat Colour");
foreach(["Default", "Aqua", "Gold"] as $colour) {
    $dropdown->addOption($colour, (bool) ($session->getPreference("chatColour") == $colour), function() use ($session, $colour) {
        $session->setPreference("chatColour", $colour, false);
    }
}

$form->addToggle("Display rank", (bool) $session->getPreference("displayRank"), function(bool $value) use ($session) {
    $session->setPreference("displayRank", $value, false);
});

$player->sendForm($form);
```

It is possible to omit the callbacks for toggles so that clicking wont do anything.

#### Note

[](#note)

Basic support for server settings forms is included. You will have to handle the packets yourself, however.

License
-------

[](#license)

Licensed under the MIT License. See the file named `LICENSE` for more information.

Copyright (c) 2019 Funo Network.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bdfe772b80766a01c9c5129c893e8eee8503d26dfb881a5d83c3f0e6400edde?d=identicon)[lukeeey](/maintainers/lukeeey)

---

Top Contributors

[![lukeeey](https://avatars.githubusercontent.com/u/32024335?v=4)](https://github.com/lukeeey "lukeeey (15 commits)")[![DelxHQ](https://avatars.githubusercontent.com/u/16628342?v=4)](https://github.com/DelxHQ "DelxHQ (1 commits)")

### Embed Badge

![Health badge](/badges/funo-network-fnlibsforms/health.svg)

```
[![Health](https://phpackages.com/badges/funo-network-fnlibsforms/health.svg)](https://phpackages.com/packages/funo-network-fnlibsforms)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
