set default value of checkbox with hidden input field

This commit is contained in:
Uwe Steinmann 2022-02-22 17:53:17 +01:00
parent 673bc9ec7d
commit aa61028f08

View File

@ -582,7 +582,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
switch($conf['type']) {
case 'checkbox':
?>
<input type="checkbox" name="<?php echo "extensions[".$extname."][".$confkey."]"; ?>" value="1" <?php if(isset($settings->_extensions[$extname][$confkey]) && $settings->_extensions[$extname][$confkey]) echo 'checked'; ?> />
<input type="hidden" name="<?php echo "extensions[".$extname."][".$confkey."]"; ?>" value=""><input type="checkbox" name="<?php echo "extensions[".$extname."][".$confkey."]"; ?>" value="1" <?php if(isset($settings->_extensions[$extname][$confkey]) && $settings->_extensions[$extname][$confkey]) echo 'checked'; ?> />
<?php
break;
case 'select':