When button is clicked, inputs become "undisabled"

Interested to know if possible that when a button is click, certain inputs can have their disabled input set to false?

So if Input X is checked, you want inputs A,B,C, & D to be enabled. That would change depending on whether the inputs are being permanently in the database or as a temporary selection during each browser session.

All you really need to do is set conditionals for the other inputs.

How would this work for buttons? The same?

Yes you can but in order to do that you have to take a different approach. Bubble does not allow the disable state. So instead:
** I have a 1 Button and a 2 Button Solution

  1. Create the input box | Enable and Disable button
  2. Create a transparent shape (Not Visible) that is over the input and brought to the front of the input
  3. Group the shape and input
  4. When the Disable button is clicked, show the shape (This will block a user from getting to the input)
  5. When the enable button is clicked, hide the shape
    6) This sandbox has the exact problem solved for you so can just copy it
1 Like

Use a custom state and set the enabled/disabled status of the inputs via conditionals.

Click the ( i ) on the properties box and add a new custom state on the page called enabled? and set the type to yes/no with a default value of “no”.
image

On the input, set it’s default to This input is disabled.
image

Add a conditional that says when this pages enabled? is “yes” this input is disabled and leave it unchecked
image

Then when the button is clicked, create a workflow to set the custom state.
image

The element should be the page name, Custom state will be ‘enabled?’ and the Value will be “yes”
image

That will enable the inputs set with the condition.

You can create a workflow that sets ‘enabled?’ back to no and that will disable the inputs again.

Hope it helps!

Eli

5 Likes

Thanks! For some reason, whenever the popup is loaded the input is automatically selected and you can edit it.

Would you want the input not focused at the beginning?

No.
Thanks.

This topic was automatically closed after 70 days. New replies are no longer allowed.