Hi all,
I use this solution to get correct phone numbers during user registration/changing profile.
Here is an working demo
http://jsfiddle.net/terveg/fxJe4/4/ which demonstrates the idea
Situation- there is a dynamic (cascade) select in form with only one result option (for example COUNTRY->COUNTRY PHONECODE).
- To make this one option selected by default when user chooses COUNTRY i use stuff->custom attributes-> selected="selected"
- I have also user_phone which is input field with JS mask, where user can fill number
- I have 3rd field - input which is the resulting field. To copy text values into this field, I use jquery script in stuff->Script (JS)
What it does:if country is changed/chosen ->child field "phonecode" get selected (so we can get text option from it). This code "is copied" into the result field.
Phonecode changes automatically, when country is changed and also automatically is "copied" into results again.
Meanwhile user type number...and these numbers is being copied into the result field as stated in JS.
If something is changed - it is updating in the result field.
Hope this helps.
Regards.