Make WordPress Core

Opened 17 months ago

Last modified 6 weeks ago

#22792 new defect (bug)

Cannot change name attribute of comment submit button

Reported by: willi828 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.4.2
Component: Comments Keywords: has-patch dev-feedback
Focuses: template Cc:


This prevents developers from using client-side validation, as the name attribute being set to "submit" interferes with the .submit() method. I can change the id and the label of the submit button, but that is all.

The default WordPress server-side validation is unacceptable from a user-experience standpoint.

This would be the solution for me, which I find cumbersome (http://wordpress.stackexchange.com/questions/65001/error-when-posting-comment-form-the-error-is-typeerror-eh-is-not-a-function).

The developer should be allowed to set the name attribute of the submit button (maybe through the use of comment_form()).

Attachments (1)

22792.diff (2.0 KB) - added by aubreypwd 7 weeks ago.
Patch to add name_attr to change the name attribute

Download all attachments as: .zip

Change History (9)

comment:1 willi82817 months ago

  • Type changed from feature request to defect (bug)

I'm changing this type to a bug as "submit" is a namespace that shouldn't be used.

comment:2 ircbot7 weeks ago

This ticket was mentioned in IRC in #wordpress-dev by aubreypwd. View the logs.

aubreypwd7 weeks ago

Patch to add name_attr to change the name attribute

comment:3 aubreypwd7 weeks ago

  • Keywords has-patch added

comment:4 aubreypwd7 weeks ago

  • Keywords needs-docs added; has-patch removed

comment:5 aubreypwd7 weeks ago

  • Keywords has-patch added

comment:6 DrewAPicture7 weeks ago

  • Focuses template added
  • Keywords dev-feedback added; needs-docs removed

22792.diff looks good to me. Could use dev feedback on whether this is a possibility for merge.

comment:7 SergeyBiryukov7 weeks ago

I'd suggest name_submit as the argument name, for consistency with id_submit.

Note: See TracTickets for help on using tickets.