Jump to content

form setting to toggle on html


Recommended Posts

Posted

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 ');

 

Posted
$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>');

 

Posted
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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...