TheJackal84 Posted May 12, 2017 Share Posted May 12, 2017 Is there a way to toggle on a $form->addHtml(' '); in the settings, for example $form->add( new \IPS\Helpers\Form\YesNo( 'ShowHTMLForm', \IPS\Settings::i()->ShowHTMLForm, FALSE, array('togglesOn' => array( 'The_setting_below' ) ) ) ); $form->addHtml('I want this to display if ShowHTMLForm = 1 '); Link to comment Share on other sites More sharing options...
DawPi Posted May 12, 2017 Share Posted May 12, 2017 I don't think so. There is no any id: /** * Add Html * * @param string $html HTML to add * @return void */ public function addHtml( $html ) Link to comment Share on other sites More sharing options...
newbie LAC Posted May 13, 2017 Share Posted May 13, 2017 $form->add( new \IPS\Helpers\Form\YesNo( 'ShowHTMLForm', \IPS\Settings::i()->ShowHTMLForm, FALSE, array('togglesOn' => array( 'my_custom_id' ) ) ) ); $form->addHtml('<div id="my_custom_id">Text</div>'); Link to comment Share on other sites More sharing options...
TheJackal84 Posted May 13, 2017 Author Share Posted May 13, 2017 4 minutes ago, newbie LAC said: $form->add( new \IPS\Helpers\Form\YesNo( 'ShowHTMLForm', \IPS\Settings::i()->ShowHTMLForm, FALSE, array('togglesOn' => array( 'my_custom_id' ) ) ) ); $form->addHtml('<div id="my_custom_id">Text</div>'); Perfect your a legend thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.