jQuery: The Write Less, Do More JavaScript Library

Ticket #2497 (new enhancement)

Opened 5 months ago

Last modified 2 months ago

:readonly

Reported by: frohoff Assigned to: anonymous
Type: enhancement Priority: minor
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords:
Cc: Needs: Review

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

Change History

Changed 2 months 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

Note: See TracTickets for help on using tickets.