TemKa_SD Posted May 2, 2019 Share Posted May 2, 2019 (edited) Здравствуйте. Есть поле, например: $form->add( new \IPS\Helpers\Form\Text( 'autohost_gamename', FFFFFFFFFFFFFFFFFFFFF, TRUE, array(), NULL, NULL, NULL, 'autohost_gamename' )); Мне нужно реализовать чекбокс, который отключает заполнение поля если выбран. nullLang не подходит, так как поле стандартно может быть заполнено данными. Edited May 2, 2019 by TemKa_SD Link to comment Share on other sites More sharing options...
Dmitriy427 Posted May 2, 2019 Share Posted May 2, 2019 $form->add( new \IPS\Helpers\Form\YesNo( 'my_toggle', \IPS\Settings::i()->my_toggle ?: FALSE, FALSE, array( 'togglesOn' => array( 'autohost_gamename' ) ), NULL, NULL, NULL, 'my_toggle' ) ); $form->add( new \IPS\Helpers\Form\Text( 'autohost_gamename', \IPS\Settings::i()->autohost_gamename ?: '', FALSE, array(), NULL, NULL, NULL, 'autohost_gamename' ) ); Link to comment Share on other sites More sharing options...
TemKa_SD Posted May 2, 2019 Author Share Posted May 2, 2019 Хочу чекбокс, с отключенным полем ) Link to comment Share on other sites More sharing options...
Dmitriy427 Posted May 2, 2019 Share Posted May 2, 2019 Оно отключается и скрывается. Хотите свой функционал, пишите и подключайте на нужной странице свой яваскрипт. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now