How To Globally Replace String In Text Field Automatically?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

How To Globally Replace String In Text Field Automatically?

Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,044 Points 20k badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,044 Points 20k badge 2x thumb
The need for this comes up surprisingly often in a very wide variety of contexts - so wide that you might not initially realize it is essentially the sample problem with minor variations. For example the recent question about a formula that had curly quotes instead of normal quotes is the most recent example. Here is a TamperMonkey user script that will replace curly quotes with normal quotes on every text input or text area that matches the URL pattern:

Fix Curly Quotes (For TamperMonkey)
https://gist.github.com/dandiebolt/e35d4cd20c8548b77435

FixCurlyQuotesInField (For Image Onload Technique)
https://gist.github.com/dandiebolt/846cedaee1111704b98e


Earlier in the week I created a demo that change a shortcode for military style time (eg 1300) to civilian time (eg 1:00 PM):

Military Time Shortcode - Add New Record
https://haversineconsulting.quickbase.com/db/bj4yismsy?a=nwr

Here is the gist:

https://gist.github.com/dandiebolt/bfe0d2c0be0cbfe1ae1f


How about including those fancy Emojis in your QuickBase application in your text fields with some HTML allowed in the same way you can use them in the Community Forum. Try this out:

Emojis
https://haversineconsulting.quickbase.com/db/bj483ad6d?a=td


Emojis - Add New Record - Enter Short Code
https://haversineconsulting.quickbase.com/db/bj483ad6d?a=nwr


Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=432


Here is the corresponding gist:

https://gist.github.com/dandiebolt/4d01194ac91a6ae51279