IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Input mask

    Posted Wed September 28, 2022 06:05 PM

    Hello Everyone,

    We are a user of AgileApps Cloud. We use webforms to collect data remotely from various sources and like to find out how to

    1.- create an input mask for some of our webforms’ fields. For example a phone number in a given format.

    2.- Restrict the format of the font case to capital letters only

    Any feedback from the community will be greatly appreciated.

    Peace,

    Jaime Suriano


    #AgileApps
    #webMethods


  • 2.  RE: Input mask

    Posted Wed January 11, 2023 09:36 PM

    not a mask but you can use this field script On Change in the field to automatically convert to upper after to exit the field. It will remove any non-alphabetic characters

     const getValidatedInput = (inputValue) => {
    inputValue = inputValue.toUpperCase();
    inputValue = inputValue.replace(/[^a-zA-Z]+/g, '');
    return inputValue;
    }
    setTextFieldValue(_sdForm, obj.name, getValidatedInput(obj.value))
    

    phone version

     const getValidatedPhone = (phoneNumber) => {
    phoneNumber = phoneNumber.replace(/^(1)?(\d{3})(\d{3})(\d{4})$/, "($2) $3-$4")
    return phoneNumber;
    } 
    setTextFieldValue(_sdForm, obj.name, getValidatedPhone(obj.value))
    

    #webMethods
    #AgileApps