New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form Builder: can't get the value of disabled fields #368

c-frater opened this Issue Jan 9, 2017 · 0 comments


None yet
2 participants
Copy link

c-frater commented Jan 9, 2017


Sometimes it makes sense to have a disabled field that the user can see but can't edit (for instance when passing data from one form to another). When getting the data from a form with disabled fields, those fields are returned as undefined, regardless of their value.

This does not tie up with hidden (as no key is returned for hidden fields)

Test Case:

const formDiv = hx.div()
const form = new hx.Form(formDiv.node())

form.addText('Text', {key: 'bob'})
  'bob': '123',
  'Steve': '456',
  'Dave': '789'

form.disabled('bob', true)
form.disabled('Steve', true)
form.hidden('Dave', true)'body').clear()


Expected Behavior should return

{ bob: '000', Steve: '456' }

Actual Behavior returns

{ bob: undefined, Steve: undefined }

Possible Fix

As part of #156 the logic for disabled was made to mirror hidden fields. I believe in this case it was done incorrectly and updating the value method to return the value of disabled fields makes the most sense.

Your Environment

  • Hexagon Version: 1.9.0

@c-frater c-frater added the Bug label Jan 9, 2017

@c-frater c-frater self-assigned this Jan 9, 2017

@c-frater c-frater added the In Progress label Jan 9, 2017

@c-frater c-frater referenced this issue Jan 9, 2017


#368 Form Builder disabled bugfix #369

6 of 6 tasks complete

@c-frater c-frater added In Review and removed In Progress labels Jan 9, 2017

@jmsmyth jmsmyth closed this in #369 Jan 9, 2017

jmsmyth added a commit that referenced this issue Jan 9, 2017

Merge pull request #369 from ocadotechnology/#368-form-builder-disabl…

#368 Form Builder disabled bugfix

@jmsmyth jmsmyth removed the In Review label Jan 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment