Submit on Enter on multilineinput -- Input Watcher v1.3.0 by Eli

@chaostorm ask @GH5T if they can share their private plugin that supposedly works :slightly_smiling_face:

@GH5T Can you please make your private plugin that supposedly works public so we can all benefit from it? :slight_smile:

(Thanks for the tip, @tylerboodman :+1: )

Alright, no one has come through, so I had to figure it out on my own. :grinning:

It turns out, the solution wasn’t that hard at all - a single conditional fixed the issue. I’m sharing it below just in case it’s useful to somebody else who experienced the same problem:

2 Likes

hey sorry i just saw this and was going to tell you i just used the single line input as it was the simplest thing to do. but very happy you solved it and selfishly i am looking forward to trying out your new solution,

1 Like

This has probably been here the whole time and i just overlooked it, but this toggle seemed to also solve the problem aswell.
Screenshot 2023-09-05 at 14.06.09

1 Like

very happy you solved it and selfishly i am looking forward to trying out your new solution

Thanks, be my guest! :slightly_smiling_face:

This has probably been here the whole time and i just overlooked it, but this toggle seemed to also solve the problem aswell.

Yup, I’ve had that one on ever since I installed the plugin. :+1:

it’s not private! It’s a Public Plugin

1 Like

This is great. Thanks @eli !

One request / suggestion: I have implemented this successfully, however, while it’s common behaviour to use enter to send on desktop, the same apps will on mobile will usually still create a line break when pressing “return / :arrow_right_hook:” key on the mobile keyboard. Would there be any way to have an option to enable enter to send when the user is on desktop and keep the original behaviour of a line break on a mobile device?

Could you add a condition to the InputWatcher to do that? I’m guessing the easiest way would be to check the window’s width?

@eli any plans to add functionality for rich text input as well?

Hi Rico I am trying to capture the Enter & Shift+Enter of an input box in a RG, but cannot figure out a good way to do so, here I got 2 options:

  1. stick to input, bind WatchInput to certain input or certain cell within the RG (failed, auto-binded to the first cell)
  2. use multiline input instead, and try to capture the Shift+Enter (failed)

Could you possibly give me some advice? Thx!

ok fixed, just passing on the cell index works well

btw this plugin is just incredible and thx!

1 Like

@eli - Thanks for the very handy and generally reliable 1T - Input Watcher plugin.

I’m observing a scenario where the WatchInput element’s value gets out of sync with the value of the watched Input. I appreciate any guidance you can provide.

To replicate:

  1. Create an Input with initial content and a WatchInput on that Input.
  2. Create an action that resets the Input (e.g., in conjunction with the hide and/or show event for a Popup that includes the Input).
  3. In run mode, change the Input’s value and trigger the reset action.

At this stage, the Input’s value matches its initial content as expected but the WatchInput’s value still reflects the changes made to the Input’s value.

Initial state
image

After modifying before resetting
image

After resetting
image

@davidb Thanks for the detailed feedback. I’ve replicated the issue and will update with a fix.

1 Like

I’m glad the replication details were helpful.

Any ETA on your update?

Can this be used with another input like TipTap (rich text)?

Hey, thanks for the great plugin! Unfortunately, I also faced an issue with it. Trying to make a messenger here and see that when triggering the exact same custom event the vanilla Bubble button works fine, but the watch input fails to correctly create a message sending the first letter on the first try and only sends the message in full on a second. Also a focus event seems not to be working as well. Any thoughts on this?

Thank you!




This might do the same thing but worth a try- add a text parameter to your custom event and pass through This Watchinput's value then when you create the message reference the parameter you made.

Thanks! That made a trick. For future reference: change the body of the message from “multiline input’s value” to “Watchinput’s value” and then add an action “Clear value of Watchinput”, as Bubble will not know what relevant inputs are to clear if there is no inputs in the vanilla “create thing”.

1 Like