Text filtering in a text field

Discussion in 'Cadence' started by Terence, Oct 22, 2008.

  1. Terence

    Terence Guest

    Hi, am new to SKILL and would like to do some text checking and
    filtering for illegal characters in the text field. Meaning I have a
    text field in my form that is only to be with text, not any of the
    symbols (i.e. ~!@#$%^&* and so on). When the user input and saved the
    fields, those characters won't be allowed to be saved.

    What will be the best way to filter out only text? Only numbers?
     
    Terence, Oct 22, 2008
    #1
  2. I know of three ways, which one to use is when you want to do the filtering:

    - register a callback for the field which does the checking and set the
    field value to a fixed value. Pay attention not to be called recursively
    :)

    - register a callback for the form which check the coherence of the whole
    form.

    - the StringField (and perhaps other) also have a modifyCallback which can
    be used to filter out characters as they are typed.

    $CDS_INST_DIR/doc/skuiref/skuiref.pdf is where to search for such things.

    Yours,
     
    Jean-Marc Bourguet, Oct 22, 2008
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.