Skip to main content

Bug Tracker

Side navigation

#2497 closed enhancement (worksforme)

Opened March 12, 2008 11:33PM UTC

Closed June 20, 2010 05:59PM UTC

Last modified March 15, 2012 01:54AM UTC

:readonly

Reported by: frohoff Owned by:
Priority: minor Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:
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

Attachments (0)
Change History (2)

Changed June 10, 2008 08:32PM UTC by ygirouard comment:1

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

Changed June 20, 2010 05:59PM UTC by dmethvin comment:2

resolution: → worksforme
status: newclosed

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.