Delete text box if selected/focus

Hello

Problem:

I need to be able to totally delete a text box only if it has the focus of cursor or has been “selected”.

Think of a form builder where you would have a question, but would want to remove the question with a button click.

The user would have to select the input they want to delete and click a button. If the input is not selected, then no deletion occurs. (Not just clearing text, but deleting the whole input)help.rp (63.8 KB)

Thank you

simple way may the text box dynamic and when you click the button you can hide it.

more simple way just hide the textbox widget but make sure you give it a name

Thank you for the suggestion.

The deletion is dependent on the text box being selected or the object of cursor focus. I came up with an ugly fix of hiding a checkbox in the field. But would be interested if there are other ideas.

Hi,

Something like that?
help (3).rp (73.5 KB)

Best,

PS: By the way, a close icon on top left of a question would do the job and might be a much easier to use and evident for your user

Thank you very much. I didn’t know that rectangles could be selected. I appreciate what you said about the close icon.

You’re welcome,

yeah not every widget has this Selection feature, and it’s really useful

PS: By the way, depending of the interactivity you need to have and the number of questions you want to display, looking to Repeater could be valuable:
https://www.axure.com/support/reference/repeater-widgets

Best and have fun prototyping :smile_cat: