Reset content of input field

Hi Bubblers!

I am having problems with the “reset relevant input” command.
Here is an example in forum app2:

The workflow is simple. When the value of an input field is changed then reset the content.

I am also trying this by using a button: Click → focus on input → reset content
None of these options are working for me. The text entered into the input field stays.

The only way I can reset the content of any input is by putting it inside a group and then resetting the group.
Am I misunderstanding the correct use of the “reset relevant input” command?

Thank you!

Toby

This is how I see it.

If you have an input box and a button and use “Reset relevant inputs”, how does the computer know what is relevant?

It doesn’t.

That’s why it works in a group, because it knows.

The other way to let the computer know the relationship between the input and the button is to do something involving the two e.g. storing the input and then you can reset it.

Look at this example I made:

Note that it stores the name and then resets it!

3 Likes

Thanks @kfhwdd for taking the time to reply and create the mini app.

That makes sense and I think I get now why it doesn’t reset the content when a button is pressed (and there is no reference to the input in the workflow).

But what I don’t quite understand is why the function doesn’t reset the input when I am using the input as the trigger: e.g.
When Input A’s value is changed —> Reset relevant inputs.

I created another input in your app that uses this. Hmmm…

No problem.

I think if you put it inside a group, you need to use “reset group data” rather than “reset all relevant inputs”.

2 Likes

Ok - I think I have worked out where the bug might be.
For normal text inputs the “reset relevant inputs” and “reset group data” work exactly as you describe above.

However when you are using an Autocomplete input then you can’t reset the input value if the autocomplete “allow entries not in list” is checked and you enter a value that is not in the list.
In that case it should reset the text entered (not the value of the dropdown) but it doesn’t.
I’ve updated the example in the forum app and I can’t get the autocomplete to reset if I enter a value that is not part of the dropdown list…

Are you seeing the same?

Facing similar situation let me know when you find I solution. I gave up on that

@Bubble - hi guys.
I think this might be a bug (at least I can t figure out how to get it to work).

IF

  1. you use an autocomplete that has the “allow entries not on the list” checkbox marked
    AND
  2. you enter Text that is not a value in the drop down
    THEN
    you can’t clear the typed text using any of the clear content methods.

Any suggestion? Thank you!

1 Like

I agree that we need help on this issue.

It would be nice to be able to reset relevant inputs of input X,Y,Z.

If the user is filling out a form and goes back through it and makes a few tweaks it doesn’t change those fields. Even if you hide things or disable fields it still doesn’t work. It saves the data inside the field regardless.

2 Likes

Any updates? I’m still having problems resetting the content of input fields.

My inputs are inside a group, and that group is inside another group.

I’ve reset group contents of both the parent group and its child group which contains the input box.

Doesn’t work.

Any ideas?

It would be very nice to specify the input to reset

4 Likes

@emmanuel, Is it possible to specify the Input field for reset, other than ambiguous relevant field

2 Likes

Hi all,

I’m having issue resetting an input when its content is defined to be an “integer”, but no issue when the content is defined to be a “text (numbers only)”. Of course, having a text doesn’t work for the rest of my logic, as I need to perform some mathematical operations on the value.

My problem is that I need to display a “-” placeholder when the value is empty, not a “0”. But somehow, even if I reset the input (via the action reset input or the action reset data), it would show “0” if the input was previously filled with some value.

Here is a recording: the left value for Monday in the pop up is an input, while the left value for Monday on the main screen is a simple text field reading the value from the database.

Doesn’t work if “integer” is set for the content format of the input:

reset%20integer%20input%20issue

Works if “text (numbers only)” is set for the content format of the input:

reset%20text%20(numbers%20only)%20input%20no%20issue

Any hint? :thinking:

@Lucien

Try an input with:
Placeholder: -
Initial content:
Content format: Integer

Put a group around the input(s).
In a workflow step, Reset the group.

Thanks, @mishav.

Unfortunately, that doesn’t do the trick :frowning:

I even tried to combine both reset input and reset group, in both orders…

I guess I shall submit a bug report…

@Lucien, does this work for you? https://forum4.bubbleapps.io/version-test/reset-number-input?debug_mode=true

What browser/OS are you testing with?

I notice you have this in a Repeating Group as well, does it make a difference if its just in a group?

Thanks a lot for taking the time to look into this!

Yes, that example works for me.

Maybe the issue is that I’m using the event “a pop up is closed” to trigger the reset then?

I’m using Chrome/MacOS (Mojave).

As a matter of fact, it’s not a repeating group, it’s a regular group.

I updated the example to do similar. Is it still a problem?

Can you copy your page to a test app and still see the problem? If so, a good way to test is gradually remove everything but the problem elements.

I’m using Chrome/Windows10.

Your example works…

I’ve made a copy of the page (in the same app though), and yes, the problem also occurs. It’s hard to remove gradually everything but the problem elements because the app is pretty complex…

I’m guessing it could be because I’m reading the initial value from the database (if that value is not empty)… but again, it’s weird that it works for when the content is defined as a text (numbers only) and not when it’s a number…

I don’t want to waste your time, but can I send you the link to my editor by PM for a quick look?

Yes okay, and some navigation instructions to see the problem :slight_smile:

Yes, of course! Thanks a million!