Skip to content

Fix so disabled controls are totally ignored from built up object model#37

Closed
mcintyre321 wants to merge 1 commit intomaxatwork:masterfrom
mcintyre321:master
Closed

Fix so disabled controls are totally ignored from built up object model#37
mcintyre321 wants to merge 1 commit intomaxatwork:masterfrom
mcintyre321:master

Conversation

@mcintyre321
Copy link

...put values, so shouldn't be included in results

#36

… input values, so shouldn't be included in results
@mcintyre321
Copy link
Author

Given a form containing

<input type="hidden" name="x" value="hello" />
<input type="hidden" name="x" value="hello" disabled="disabled" />

form2js will currently return a null value for x - disabled controls should be totally ignored and instead form2js should return {x:"hello"}

@lookfirst
Copy link
Contributor

Nice fix. I checked this into my fork.

@maxatwork
Copy link
Owner

Disabled controls are intentionally excluded by default in the current DOM extractor, including disabled fieldset descendants unless getDisabled is enabled. That behavior is documented and covered in packages/dom/test/dom.test.ts, so I am closing this legacy PR as already addressed.

@maxatwork maxatwork closed this Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants