You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GiantQuartz edited this page Apr 21, 2020
·
1 revision
CallbackCustomForm
Example of usage
$form = newCallbackCustomForm(newTranslationContainer("TITLE"));
$form->addElement("example", newInput(newTranslationContainer("INPUT"))); // Adds a element with the id 'example'// Use CallbackCustomForm->setSubmitListener() to set a callback with a closure that// will be executed whenever the form is submitted$form->setSubmitListener(function($_) use ($form) {
$desc = $form->getElement("example")->getResult(); // The text introduced on the input 'example'
});
// Opens the form to a player$player->openForm($form);