Project

General

Profile

Actions

Bug #17083

closed

no alternative default value possible in checkboxes

Added by Martin H. about 17 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2007-03-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

It's not possible to set a a value in a FORM checkbox.
The value field is used for making it checked=checked.

But sometimes it's neccesary to submit an value in a checkbox even if it has a name set.

It's defined in class.tslib_content.php:
01753 // alternative default value:
01754 $default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], trim($parts2));
01755 $checked = $default ? ' checked="checked"' : '';
01756 $fieldCode=sprintf('<input type="checkbox" value="%s" name="%s"'.$elementIdAttribute.'%s'.$addParams.' />',
01757 1, $confData['fieldname'], $checked);

The value is set to 1 by default.

(issue imported from #M5141)

Actions

Also available in: Atom PDF