Skip to content
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

field value is not post in form #22

Closed
gchokeen opened this issue Jan 27, 2014 · 9 comments
Closed

field value is not post in form #22

gchokeen opened this issue Jan 27, 2014 · 9 comments

Comments

@gchokeen
Copy link

Thanks great plugin. I was trying to use the field inside form. When submit the form, I was trying to get the value of the field. For example If I selected India (+91). I was expecting 91 in form $_post['mobile-number']. But It always return null. I just inspected element and just noticed the input field doesn't have value attrbute. Can you please fix this bug to use inside form.

<input type="tel" id="mobile-number" name="mobile-number">

Thanks
Gowri

@jackocnr
Copy link
Owner

By default, the autoHideDialCode option is true, which means if there is just a dial code in the input then when it loses focus (e.g. when it is submitted), it will automatically be emptied. The assumption is that no-one would ever want to submit just a dial code as their telephone number. If you want to allow this though, just set autoHideDialCode to false when you initialise the plugin.

@gchokeen
Copy link
Author

Thanks for reply, but I already set the autoHideDialCode as false. Still the value was not setting up in value attribute in text field. But it showing in text field on UI.

@jackocnr jackocnr reopened this Jan 27, 2014
@jackocnr
Copy link
Owner

Can you confirm that it works if you don't initialise the plugin, and you just type +91 in the input and submit the form?

@gchokeen
Copy link
Author

Just tested, Yeah it posting the value without initialise the plugin, If we have option to post either +91 or IN (country code). If we have both option, it will be very useful.

Thanks

@jackocnr
Copy link
Owner

I can't reproduce this. Are you submitting the data in an ajax request? Can you please post all the relevant code?

@gchokeen
Copy link
Author

I am not using ajax. I create the separate page to test with plugin code. It works. So I think something wrong in my code. nothing wrong with plugin. Thanks for your time to look at that.

Please consider to add this feature.

If we have option to post either +91 or IN (country code). If we have both option, it will be very useful.

Thanks

@jackocnr
Copy link
Owner

Can you please open a new issue for that feature request, and add more detail about how you would want it to work, and why it would be useful. Just so you know I'm only interested in adding new features if they will be useful to a lot of people.

@magsense
Copy link

this would be useful to me

@jackocnr
Copy link
Owner

Hi magsense, as I said before, please open a new issue for this, and add as much detail as possible.

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

No branches or pull requests

3 participants