Bug Tracker

Modify

Ticket #2497 (closed enhancement: worksforme)

Opened 5 years ago

Last modified 15 months ago

:readonly

Reported by: frohoff Owned by:
Priority: minor Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: Cc:
Blocking: Blocked by:

Description

It would be nice to have a :readonly form filter (readonly="true"), similar to :disabled, for complex forms that need immutable inputs that still get submitted with the form action

Change History

comment:1 Changed 5 years ago by ygirouard

You mean a way to filter in or out readonly inputs in a form inside a selector?

If so, you can do this like this already:

i.e.:

// To select all readonly inputs in form with id "form_id"
$("#form_id input[readonly='readonly']").serialize();

// To select all inputs BUT readonly ones
$("#form_id input[readonly!='readonly']").serialize();

Look at the attributes section of this page for more details:  http://docs.jquery.com/Selectors

comment:2 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

See above for the solution. Adding new pseudos isn't a good idea because they throw console warnings in Firefox / Safari / Chrome due to the use of querySelectorAll.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.