Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    text masking

    I need suggestions on how to deal with the following problem. I have masking that allows for any character to be entered including the prompt character which is "_". How can I go about doing this without having the change the prompt char? Right now when I enter "_" it doesn't save as part of the value. Please note we are not using the built-in masking but a modified MaskedTextItem due to the restriction in the masking of the built-in one (this should not matter for my problem I don't think).

    Code:
    isc.DynamicForm.create({
        width: 400,ID: "test",
        fields: [
            { name: "state", title: "State", type: "text",
              mask: "CC", hint: ">LL", name: "ccTest"}
        ]
    });
    
    isc.Button.create({ID: "testButton", top: 200,title: "showValue",click: function(){isc.warn(test.getValue("ccTest"));}})
    Last edited by acarur01; 2 May 2011, 06:04.

    #2
    The code you've got below would be expected to reject the "_" character since it's not a number.

    Did you note in the docs the ability to define a regular expression as a means of allowing a custom set of characters to be input?

    Comment


      #3
      According to the documentation, "C" represents any character or space..Does this not mean ANY characters inlcluding numbers or "_"?

      Comment


        #4
        The way the mask is processed does exclude the maskPromptChar from being used during entry. Therefore to allow entry of the '_' char you must change the prompt character to something that is not allowed during entry.

        Comment


          #5
          Well, if 'C' is any character, then I have no choice do I? No matter what maskPromptChar is, it will always be ignored.

          Comment


            #6
            Correct. There is no other current workaround.

            Comment

            Working...
            X