# Restrict String Data type to receive Alphabets only

**URL:** <https://forum.getodk.org/t/restrict-string-data-type-to-receive-alphabets-only/3210>\
**Category:** Support\
**Created:** [May 16, 2014, 12:49pm UTC](https://forum.getodk.org/t/restrict-string-data-type-to-receive-alphabets-only/3210 "2014-05-16T12:49:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syed\_Muhammad\_Qadeer](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/syed_muhammad_qadeer/32/13357_2.png) [@Syed\_Muhammad\_Qadeer](https://forum.getodk.org/u/Syed_Muhammad_Qadeer)\
**Post date:** [May 16, 2014, 12:49pm UTC](https://forum.getodk.org/t/restrict-string-data-type-to-receive-alphabets-only/3210/1 "2014-05-16T12:49:40Z")

</div>

Hi,

Is there any way to specify appearance of String field to show Alphabet keyboard only.

For example a field to capture Respondent\_Name will be a string field. I want to specify that no one should be able to enter 123 in that. Only alphabets A-Z or a-z should be entered. Can we use some attribute like we have appearance="numbers" for numbers.

Thanks

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [May 16, 2014, 2:04pm UTC](https://forum.getodk.org/t/restrict-string-data-type-to-receive-alphabets-only/3210/2 "2014-05-16T14:04:21Z")

</div>

By default only the default keyboard shows. You can use regex on a  
constraint to only allow letters to be saved on swipe. Something like  
regex(., '[A-Za-z]') would work.

Yaw

> **···**
>
> -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.
> 
> On Fri, May 16, 2014 at 5:49 AM, [plannerqadeer@gmail.com](mailto:plannerqadeer@gmail.com) wrote:
> 
> > Hi,
> > 
> > Is there any way to specify appearance of String field to show Alphabet keyboard only.
> > 
> > For example a field to capture Respondent\_Name will be a string field. I want to specify that no one should be able to enter 123 in that. Only alphabets A-Z or a-z should be entered. Can we use some attribute like we have appearance="numbers" for numbers.
> > 
> > Thanks
> > 
> > ## --
> > 
> > Post: [opendatakit@googlegroups.com](mailto:opendatakit@googlegroups.com)  
> > Unsubscribe: [opendatakit+unsubscribe@googlegroups.com](mailto:opendatakit+unsubscribe@googlegroups.com)  
> > Options: [http://groups.google.com/group/opendatakit?hl=en](http://groups.google.com/group/opendatakit?hl=en)
> > 
> > * * *
> > 
> > You received this message because you are subscribed to the Google Groups "ODK Community" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to [opendatakit+unsubscribe@googlegroups.com](mailto:opendatakit+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [April 27, 2019, 10:45pm UTC](https://forum.getodk.org/t/restrict-string-data-type-to-receive-alphabets-only/3210/3 "2019-04-27T22:45:56Z")

</div>

Split this topic on April 27, 2019, 10:45pm UTC

A post was split to a new topic: [SurveyCTO error](https://forum.getodk.org/t/surveycto-error/19540)
