Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
TheJackal84 Posted May 12, 2017 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 ');
DawPi Posted May 12, 2017 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 )
newbie LAC Posted May 13, 2017 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>');
TheJackal84 Posted May 13, 2017 Author 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.