Grammar Question
Posted: Mon Oct 30, 2017 3:29 pm
Hi Team,
I’m trying to define a field grammar that allows for entry of values 1-99 or *
I’ve tried two approaches: (1) type=“digits?maxlength=2” and (2) setting a field-level jsgf grammar (with mode=“dtmf”) that looks like this: ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | “*” )+
Approach 1 gets me the right value but doesn’t recognize “*” input
Approach 2 only yields the 1st digit of input (e.g. I enter 11 but only receive 1 in the field variable) but allows for the entry of “*”
Your help is very much appreciated.
Thanks...Scott
I’m trying to define a field grammar that allows for entry of values 1-99 or *
I’ve tried two approaches: (1) type=“digits?maxlength=2” and (2) setting a field-level jsgf grammar (with mode=“dtmf”) that looks like this: ( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | “*” )+
Approach 1 gets me the right value but doesn’t recognize “*” input
Approach 2 only yields the 1st digit of input (e.g. I enter 11 but only receive 1 in the field variable) but allows for the entry of “*”
Your help is very much appreciated.
Thanks...Scott