input text mask with L literal char

  1. #1

    input text mask with L literal char

    Dear forum experts,

    Kindly advice me on the following case:

    I use ux:inputtextmask plugin in order to enforce user to fill in the texfield in the format HL999999, for example HL000100.

    Therefore i set the mask property to HL999999, and here come the cas, the textfield show H_______ where the plugin treat L as capital case rule rather as literal L Character.


    Really apreciate your kind help.

    Thanks and Regards,

    Wirianto Widjaya
  2. #2
    Hi,

    Confirmed, there is a problem. I can't see any internal mechanism to mark some symbol to be not considered as a special character.

    I can suggest the following workaround:

    Example
    <ext:TextField runat="server">
        <Plugins>
            <ux:InputTextMask Mask="HL9999" />
        </Plugins>
        <Listeners>
            <AfterRender Handler="this.plugins.specialChars += 'L';
                                  this.plugins.viewMask = 'HL____';" />
        </Listeners>
    </ext:TextField>
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Confirmed, there is a problem. I can't see any internal mechanism to mark some symbol to be not considered as a special character.

    I can suggest the following workaround:

    Example
    <ext:TextField runat="server">
        <Plugins>
            <ux:InputTextMask Mask="HL99999" />
        </Plugins>
        <Listeners>
            <AfterRender Handler="this.plugins.specialChars += 'L';
                                  this.plugins.viewMask = 'HL____';" />
        </Listeners>
    </ext:TextField>
    Hi Daniil,

    Thank you for your kind response.

    I have tried as per your suggestion, but still no luck.

    Herewith my code snippet:

    <ext:TextField runat="server" ID="ProgramCode" MinLength="7" MaxLength="7" LabelSeparator=" "
                        DataIndex="ProgramCode" FieldLabel="Program Code" Width="100" IDMode="Explicit"
                        IsRemoteValidation="true" Cls="primary-key-field" AllowBlank="False" IsFormField="True"
                        ValidateDelay="0" CausesValidation="True" MaskRe="[HLhl0-9]" Regex="/(^HL|^hl)[0-9]{5}/"
                        RegexText="The Format of The Program Code should be in HL99999">
                        <RemoteValidation OnValidation="validatePrimaryKey" />
                        <Plugins>
                            <ux:InputTextMask ID="ProgramCodeMask" Mask="HL99999"/>
                        </Plugins>
                        <Listeners>
                            <AfterRender Handler="this.plugins.specialChars += 'L';
                                                  this.plugins.viewMask = 'HL_____';" />
                        </Listeners>
    </ext:TextField>
    The text field still behave exactly the same. Kindly point out my possible mistake(s).

    Thanks and Best Regards,

    Wirianto Widjaya
  4. #4
    In your case please use:
    <AfterRender Handler="this.plugins[0].specialChars += 'L';
                          this.plugins[0].viewMask = 'HL_____';" />
  5. #5
    Dear Daniil,

    Working as expected!, Thank you very much for you kind help. Kindly also close this thread for me.

    Thanks and Best Regards,

    Wirianto Widjaya

Similar Threads

  1. Listener for TreeGrid XTemplate Text Input
    By Chantruese in forum 1.x Help
    Replies: 0
    Last Post: May 29, 2012, 3:08 AM
  2. [CLOSED] Change text Mask
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 06, 2012, 12:21 PM
  3. [CLOSED] Input Mask for textfield
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 20, 2010, 10:20 AM
  4. New line character literal in message box
    By kumarxlnt in forum 1.x Help
    Replies: 4
    Last Post: Sep 30, 2009, 9:23 AM
  5. Replies: 6
    Last Post: Aug 13, 2009, 9:35 AM

Tags for this Thread

Posting Permissions