Skip 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.

Position cursor in middle of text field

Featured Replies

I've got a comments text field in my database. I'd like to have a button which adds a user's name and the date to the top of the text field, and then positions the cursor beneath it so they can add text. The aim is that users can keep adding comments, with the newest always at the top and the facility to scroll down to see older comments.

How can I pull this off? It occured to me that I can cut the entire contents of the field, insert the username and date, and then paste back the field contents. This would be fine, except that it requires the user to position the cursor before typing. I'd rather have the cursor automatically in the right place.

I'm on MacOS, so could probably pull it off with an AppleScript, expect that I need this solution to work under Windows as well.

mga,

This can be done pretty easily. Here is generally how it is done:

Use the Set Field scrip step to make your big notes field equal to a couple of carriage returns & itself.

Set Field [YourField; "¶¶" & YourField]

(it may not be obvious but you can indeed set a field equal to itself)

Then in the next step you can add:

Set Selection [YourField; Start Position 1; End Position 1]

I think you'd be better off with a separate record for each note - see here.

  • Author

Thanks, that works.

I used a solution similar to the first one, with these adaptations:

Set Field [YourField; ¶ & ¶ & ¶ & YourField]

Set Selection [YourField; Start Position 1; End Position 1]

Insert Calculated Result [ ... & ¶]

with a calculated result giving the string ">mm/dd/yy username". This adds in the information I want, and puts the cursor in the right position for user entry.

Cool. You could probably use Set Field instead of Insert Calculated Result but it sounds like it works for you.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.