Bug #17083

no alternative default value possible in checkboxes

Added by Martin H. over 6 years ago. Updated about 1 month ago.

Status:Needs Feedback Start date:2007-03-06
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:Content Rendering
Target version:-
TYPO3 Version:4.0 Complexity:
PHP Version:
Votes: 0

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)

History

Updated by Alexander Opitz about 1 month ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.0

As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?

Also available in: Atom PDF