Page 1 of 1

Re: External Grammar tweak

Posted: Mon Mar 26, 2012 12:04 pm
by support
There's no fix for this in the grammar file. Before assigning your digits to a variable, you'll have to use Javascript to remove the spaces. For example:

Code: Select all

<form>
  <field name="digits">
    <!-- Your external grammar -->
    <prompt>Your prompt</prompt>

    <filled>
       <assign name="digits_without_spaces" expr="digits.replace(/ /g, '')"/>
    </filled>
  </field>
</form>
The Javascript inside the expr attribute takes the input from the "digits" field and replaces all spaces with empty strings.