is this possible in any way, with javascript maybe? I have an input whose text i want to be be able to also modified with a button, however, i’m having trouble with that.
I was able to do this with standard Bubble tools:
- Create a custom state of yes/no, default ‘no’
- place a condition on the input that when custom state is ‘yes’, Initial content = [your custom text]
- Place a workflow on the button that:
A. *first resets the data in the groups (i.e. clears the form)
B. Sets custom state to ‘Yes’
Clicking the button will now will the input with whatever I had set on the input’s condition.
*It’s important to first reset the data, because if the user has already aded their own values into an input field, it will not revert to show the ‘initial content’ because there’s nothing initial about it anymore.
Note that this initial content doesn’t have to be arbitrary text, it can be anything such as referencing a specific data in the database, another field on the form, a dropdown’s value, etc.
thanks! resetting the group was the key to get it working.
1 Like
This topic was automatically closed after 70 days. New replies are no longer allowed.