Re: External Grammar tweak
Posted: Mon Mar 26, 2012 12:04 pm
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:
The Javascript inside the expr attribute takes the input from the "digits" field and replaces all spaces with empty strings.
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>