[TYPO3-core] Bug #1578: Radio button validation does not work if there is only one radio button

Sebastian Kurfuerst sebastian at garbage-group.de
Sun Nov 27 15:21:43 CET 2005


This is a CVS patch request.

Bugtracker reference:
http://bugs.typo3.org/view.php?id=1578

Type:
Bugfix

Branches:
HEAD

User writes:
validateForm() will not correctly validate radio buttons if there is
only one radio button in a group. This is because fObj.length
(t3lib/jsfunc.validateform.js line 87) is undefined in this case, and
therefore the validation loop is never entered and "value" remains
undefined.

Solution:
      * check if the length of the radio button can be found, if no,
        then only one radio button is in the radio group.

Remarks:
      * Normally, you don't need this case, however, sometimes
        automatically radio buttons are created - and then it can happen
        that just one radio button is shown. 
      * Please check the bugtracker reference for a working example.

Greets, Sebastian

-- 
Sebastian Kurfuerst
http://garbage-group.de/kontakt.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_1578_2.patch
Type: text/x-patch
Size: 683 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20051127/92d4eacb/attachment.bin 


More information about the TYPO3-team-core mailing list