winmarkltd / BootstrapFormHelpers

Bootstrap Form Helpers
https://bootstrapformhelpers.com
1.16k stars 374 forks source link

selectbox hidden input does not trigger change event? #71

Closed 01iv3r closed 11 years ago

01iv3r commented 11 years ago

The selectbox helper doesn't seem to trigger a change event when the value is changed on it's hidden input.

see: http://stackoverflow.com/questions/6533087/jquery-detect-value-change-on-hidden-input-field/8965804#8965804

What's the best way is to get a countries selectbox to update the data-country attribute on a bfh-phone input when the hidden input value is changed?

01iv3r commented 11 years ago

I just noticed that you can have the bth-states helper update its data-country attribute if you supply it the id of a bth-countries helper. Unfortunately, this same behaviour does not seem to work with the phone helper. Is that case, or am I doing something wrong? Should I post a feature request for having this functionality also added to the phone helper?

vlamanna commented 11 years ago

I'll fix that.

01iv3r commented 11 years ago

Awesome. Thank you!

ytzvan commented 11 years ago

Hey I've the same problem. When I use data-country="US" to show a default country in bfh-selectbox bfh-countries, the phone format is loaded, but if I change the country, the format in the bfh-phone remains. I'm using the version 1.8.2-2-g2aa6b22.

vlamanna commented 11 years ago

Alright, looking at the code all these issues have been fixed.

oneleft commented 8 years ago

This is still an issue for me and I am using 2.3.0... did it get broken in an update? is there a way I can manually trigger the change event and cause bfh-phone to update?