Task #6521

form ViewHelper: add "objectName" argument that overrules name attribute

Added by Mam Violeng over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-02-19
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:ViewHelpers
Target version:-
Has patch:

Description

The problem is related to XHTML Strict 1.0 validation which does not allow the attribute "name" for form tags, and when use id attribute instead of name then the function $this->request->getArgument('member') does not work anymore ("member" is the name of the form).


Related issues

related to TYPO3.Fluid - Bug #5512: form view helper produces invalid XHTML output Resolved 2009-11-26

Associated revisions

Revision 8905c94a
Added by Bastian Waidelich about 5 years ago

[~TASK] Fluid (ViewHelpers): Added argument "objectName" to form ViewHelper. This is now the recommended way to specify the name of the object that is bound to a form! If objectName is not specified, the name attribute will be used as object name for backwards-compatibility reasons. This resolves #6521

History

#1 Updated by Sebastian Kurfuerst about 5 years ago

  • Project changed from Extbase MVC Framework to TYPO3.Fluid

#2 Updated by Bastian Waidelich about 5 years ago

  • Subject changed from Using id attribute instead of name in fluind form to Using id attribute instead of name in fluid form ViewHelper
  • Category set to ViewHelpers

#3 Updated by Bastian Waidelich about 5 years ago

  • Status changed from New to Needs Feedback
  • Assigned To set to Sebastian Kurfuerst
  • Branch set to v4 + v5

This is indeed a problem.. But using the id would be dangerous as the same id can't be used multiple times on one page. IMO we should not set any attribute to the object name at all - or why would we need that?
Instead we could rename the argument to objectName so you could still set the name attribute explicitly.. But that would be a breaking change..
Maybe we should add it in a backwards-compatible way so that objectName overrules name.

@Sebastian: If you agree, please re-assign this to me and I'll fix it asap!

#4 Updated by Sebastian Kurfuerst about 5 years ago

  • Assigned To changed from Sebastian Kurfuerst to Bastian Waidelich

Hey,

Bastian Waidelich wrote:

This is indeed a problem.. But using the id would be dangerous as the same id can't be used multiple times on one page. IMO we should not set any attribute to the object name at all - or why would we need that?
Instead we could rename the argument to objectName so you could still set the name attribute explicitly.. But that would be a breaking change..
Maybe we should add it in a backwards-compatible way so that objectName overrules name.

@Sebastian: If you agree, please re-assign this to me and I'll fix it asap!

+1

Greets,
Sebastian

#5 Updated by Bastian Waidelich about 5 years ago

  • Subject changed from Using id attribute instead of name in fluid form ViewHelper to form ViewHelper: add "objectName" argument that overrules name attribute
  • Status changed from Needs Feedback to Accepted

#6 Updated by Bastian Waidelich about 5 years ago

  • Tracker changed from Feature to Task

#7 Updated by Bastian Waidelich about 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4905.

Also available in: Atom PDF