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 6cac794913
commit 1e85c6c5c6

View File

@ -549,7 +549,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':