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.

Cut and Paste into PHP/FX TextArea field

Featured Replies

Howdy out there.

I've got a science conference registration system running on PHP/FX, FMP7 Server Advanced. One of the functions is for people to add an abstract of their presentation. The page works fine when you type in the data. But when you cut and paste into one field, the new record or edit record functions fail. That field is the abstract itself, and the pasted text can be long. But length does not seem to matter. What does seem to matter is whether or not the pasted text comes from a formatted Word file vs. a text-only ASCII file. Cutting and pasting from the ASCII files works; no error. The submission also works works if you cut and paste into other fields on the form from the same formatted Word doc. The difference is that those fields are whereas the broken one is a field.

I wonder if there is some PHP function that would strip formatting before the field goes into the database. Or maybe there is something about textarea fields and how one should handle them?

Thanks in advance.

Gary

PHP has a few functions to handle this type of thing. However, the textarea may not be getting to the PHP (i.e. not leaving the browser).

PHP has "addslashes()", "convert_uuencode()", "htmlentities()", etc that can be used to condition strings. You can also check "magic_quotes" in the PHP documentation.

Good Luck.

Garry

p.s. You may also need to look at some Javascript functions.

  • Author

Maybe the htmlspecialchars function will do the job. I'll give it a try.The real challenge here is the diagnosis!

Thanks,Garry.

--Gary

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.