flurinus on "[Plugin: Participants Database] Input type "email" instead of "text""

ساخت وبلاگ

To prevent auto-capitalization in the email-form field on iOS-devices, I'd like to change its input type from "text" to "email", as suggested here: http://stackoverflow.com/questions/5171764/how-do-you-tu-off-auto-capitalisation-in-html-form-fields-in-ios

Is there an easy way to do this? If not, are there other ways to prevent auto-capitalization and/or auto-correction on iOS devices (iPad/iPhone)?

Thanks a lot in advance!

PS. I'm aware that the capitalization of email addresses is irrelevant from a technical point of view, but many users find it disturbing.

https://wordpress.org/plugins/participants-database/

flurinus
Member
Posted 17 hours ago #

Small addition: I think that when setting the input type to "email", iOS not only disables auto-capitalization, but also provides a dedicated keyboard containing @, ".com", and similar web-related 'keys.' Would thus be really great if the input type could be set to "email" as described in the above-cited stackoverflow thread.

Currently this is only possible using a custom template. It's pretty easy, though. After the $this->the_field() call, place this line of code:

<?php if ( $this->field->name === 'email' ) { $this->field->attributes['type'] = 'email'; } ?>

Change the name it's looking for if your email field has a different name.

General instructions for using a custom template are found here:

Using Participants Database Custom Templates

flurinus
Member
Posted 9 minutes ago #

Thank you very much for this, too. It works perfectly, and indeed was easy to implement. Really appreciate!!

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 341 تاريخ : سه شنبه 12 مرداد 1395 ساعت: 16:38