PHP code example of reinfyteam / libpmform
1. Go to this page and download the library: Download reinfyteam/libpmform library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
reinfyteam / libpmform example snippets
use czechpmdevs\libpmform\type\SimpleForm;
$form = new SimpleForm("Server menu", "Choose an option");
$form->addButton("Continue");
$form->setCallback(function($player, $response): void {
if($response->isValid()) {
$player->sendMessage("The selected form response was received.");
}
});
$player->sendForm($form);