Builtin digit grammar plus "#"
Posted: Fri Feb 25, 2005 1:20 pm
Hello Plum Team,
I have been trying to use the builtin digit grammar for a field. I would like the user to terminate input with '#' which works fine by default. But I also would like to accept only '#' (which is used to back up to a previous dialog).
'#' and '*' are the only keys that throw a nomatch in the builtin digits grammar.
I tried this first:
<field name="newPassword" type="digits"> (no specific length)
<grammar>"#"</grammar>
but when a digits were terminated with '#', all that was in the field was the '#'.
I am now doing the following :
<field name="newPassword" type="digits"> (no specific length)
<grammar>"*"</grammar>
The only thing that can throw a nomatch is now the '#'.......... this method allows terminating digits with '#' and entering '#' by itself. When there is a nomatch, I know that '#' was entered by itself.
Is there a more elegant way to accomplish this?
Thank you
Lou Abbruzzesi
I have been trying to use the builtin digit grammar for a field. I would like the user to terminate input with '#' which works fine by default. But I also would like to accept only '#' (which is used to back up to a previous dialog).
'#' and '*' are the only keys that throw a nomatch in the builtin digits grammar.
I tried this first:
<field name="newPassword" type="digits"> (no specific length)
<grammar>"#"</grammar>
but when a digits were terminated with '#', all that was in the field was the '#'.
I am now doing the following :
<field name="newPassword" type="digits"> (no specific length)
<grammar>"*"</grammar>
The only thing that can throw a nomatch is now the '#'.......... this method allows terminating digits with '#' and entering '#' by itself. When there is a nomatch, I know that '#' was entered by itself.
Is there a more elegant way to accomplish this?
Thank you
Lou Abbruzzesi