Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Remove text formatting and non-alphanumeric characters

Featured Replies

I'm trying to have a field format its content as all caps and assign the font / size as I indicate in the Inspector panel. I also need to remove all non-alphanumeric characters from the input.

Generally speaking it works ok other than despite "Synchronized with field's font" being selected for the field, input pasted from a pdf string for instance retains its source formatting (or at least does not apply field's formatting). I though of maybe stripping the formatting through calculation rather than to rely on Inspector settings.

...I get weird results though, input appears twice in the field. Clearly I messed something up in this function.... any help?

 

TextFormatRemove ( Self ) & Filter ( Self ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" )

input appears twice in the field.

 

TextFormatRemove ( Self ) & Filter ( Self ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" )

 

That's because you are calculating the input twice, then concatenating the results with the '&' operator.

 

Instead, you need to apply the second function to the result of the first one:

TextFormatRemove ( Filter ( Self ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ) )

or (formatted differently)

TextFormatRemove ( 
  Filter ( 
    Self ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 
  ) 
)

or (using Let() to calculate an intermediate result)

Let (
  res = Filter ( Self ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ) ;
  TextFormatRemove ( res )
)
  • Author

once again, I've learned something

thanks eos

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.