admin管理员组文章数量:1122826
I am using WP forms and want to have a dropdown menu where users can select their timezone. I found a list that I could hardcode into the dropdown but I read somewhere that this would be a bad idea because of daylight savings time. Not sure if that is the case.
Anyway, if anyone has some suggestions for this I would really appreciate it. Not sure if it is possible also to automatically detect the users timezone and store it in hidden field. This would be a better user experience.
I am using WP forms and want to have a dropdown menu where users can select their timezone. I found a list that I could hardcode into the dropdown but I read somewhere that this would be a bad idea because of daylight savings time. Not sure if that is the case.
Anyway, if anyone has some suggestions for this I would really appreciate it. Not sure if it is possible also to automatically detect the users timezone and store it in hidden field. This would be a better user experience.
Share Improve this question asked Dec 31, 2019 at 8:03 user10980228user10980228 1691 silver badge14 bronze badges 1- you can use the function timezone_identifiers_list to have the timezone list – Kaperto Commented Dec 31, 2019 at 8:57
2 Answers
Reset to default 0You may have to use smart tag {date format="m/d/Y"}
If you want to give users to select a timezone then you can render a select field and the options could be fetched using wp_timezone_choice function.
For automatically selecting a timezone, you might want to use the browser's geolocation detection feature, which would be a less preferred solution though.
本文标签: Timezone dropdown in form
版权声明:本文标题:Timezone dropdown in form 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736293383a1929134.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论