Translations:Plugins - advanced/110/ja
From LimeSurvey Manual
// init()の内部 Yii::app()->formExtensionService->add(
'globalsettings.general', new TextInput([ 'name' => 'myinput', 'label' => 'Label', 'disabled' => true, 'tooltip' => 'Moo moo moo', 'help' => 'Some help text', 'save' => function($request, $connection) { $value = $request->getPost('myinput'); if ($value === 'some invalid value') { throw new SaveFailedException("Could not save custom input 'myinput'"); } else { SettingGlobal::setSetting('myinput', $value); } }, 'load' => function () { return getGlobalSetting('myinput'); } ])
); </syntaxhighlight>