Task #6521

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

Added by Mam Violeng over 3 years ago. Updated over 2 years ago.

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

100%

Category:ViewHelpers
Target version:-
Has patch:
Votes: 0

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 almost 3 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

Updated by Sebastian Kurfuerst almost 3 years ago

  • Project changed from Extbase MVC Framework to TYPO3.Fluid

Updated by Bastian Waidelich almost 3 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

Updated by Bastian Waidelich almost 3 years ago

  • Status changed from New to Needs Feedback
  • Assignee 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!

Updated by Sebastian Kurfuerst almost 3 years ago

  • Assignee 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

Updated by Bastian Waidelich almost 3 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

Updated by Bastian Waidelich almost 3 years ago

  • Tracker changed from Feature to Task

Updated by Bastian Waidelich almost 3 years ago

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

Applied in changeset r4905.

Also available in: Atom PDF