Details
-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 4.3.0-b1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
CORE-2546 added the ability to disable submit buttons on form submission.
This task aims to add an option to configure which fields can be disabled by allowing a class to be defined and checked.
Consider:
<form class="disable-on-submit" data-disable-on-submit="disable_me"> <input type="text" name="test" value="Test" /> <input type="button" name="button" value="Press Me" class="disable_me" /> <input type="submit" name="process" value="Process" /> <button type="submit" name="submit" value="Submit" class="disable_me" /> </form>
In the above HTML, the "disable-on-submit" form class will disable all submit buttons by default upon submission. We will further limit this by:
- Allowing the form to set a "data-disable-on-submit" value which contains the name of a class, which can be any string that does not begin with a period (.) or pound (#) symbol.
- When a class is set in that data-disable-on-submit attribute, only fields within the form that set that class should be disabled.
- For example, the above code defines the class "disable_me". Only the fields within the form that contain the class "disable_me" should actually be disabled. All other fields should not be disabled.
Issue Links
- relates to
-
CORE-2546 Add ability to disable submit buttons on submit
- Closed