aurelia-ui-toolkits / aurelia-materialize-bridge

Materialize CSS components for Aurelia
http://aurelia-ui-toolkits.github.io/demo-materialize/
MIT License
156 stars 53 forks source link

Can't get form value from checkbox #540

Closed glennpierce closed 5 years ago

glennpierce commented 5 years ago

I am having trouble getting the value from a checkbox. This is when it is checked and submitted. I am using serializeArray to get the values of the form.

I think the name attribute on md-checkbox is being removed.

I have an example gist here

https://gist.run/?id=401d17507278f8a816d8f430c33fa0f3

Thanks

MaximBalaganskiy commented 5 years ago

serializeArray looks for the value attribute which is not present on this custom element

glennpierce commented 5 years ago

Thanks. What you you suggest as a work around ?

MaximBalaganskiy commented 5 years ago

Depending on the size of your form, I could just manually construct the array from the view model bound fields. Or bind to the container object and then convert that pojo to an array

On Thu., 17 Jan. 2019, 12:19 am Glenn Pierce <notifications@github.com wrote:

Thanks. What you you suggest as a work around ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aurelia-ui-toolkits/aurelia-materialize-bridge/issues/540#issuecomment-454775854, or mute the thread https://github.com/notifications/unsubscribe-auth/ADimvFFOaHQ_7a3g_EP6jDeqTZtZMWbHks5vDybcgaJpZM4aDAgf .