# Perspective Text field - select all contains of the text field when clicks on it

**URL:** <https://forum.inductiveautomation.com/t/perspective-text-field-select-all-contains-of-the-text-field-when-clicks-on-it/58717>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [April 21, 2022, 7:54pm UTC](https://forum.inductiveautomation.com/t/perspective-text-field-select-all-contains-of-the-text-field-when-clicks-on-it/58717 "2022-04-21T19:54:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhananjay\_vichare](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dhananjay_vichare/32/74712_2.png) [@dhananjay\_vichare](https://forum.inductiveautomation.com/u/dhananjay_vichare)\
**Post date:** [April 21, 2022, 7:54pm UTC](https://forum.inductiveautomation.com/t/perspective-text-field-select-all-contains-of-the-text-field-when-clicks-on-it/58717/1 "2022-04-21T19:54:17Z")

</div>

Hello All,

One of our projects we are using touch screen PC and Ignition 8.1.13  
Our client ask the feature request as per per below in the application.

We have text field in the perspective, we are suggest some value depending upon selection and fill it in the text field.  
If operator want to not use that value and put his own. He need to delete that entire filled value/text before enter new value/text.  
Is there any option, when operator click/touch on a particular text field the whole value/text displayed in the field will be selected and he can delete that using one backspace? Please advise.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [April 21, 2022, 7:58pm UTC](https://forum.inductiveautomation.com/t/perspective-text-field-select-all-contains-of-the-text-field-when-clicks-on-it/58717/2 "2022-04-21T19:58:06Z")

</div>

While not exactly what you want, as long as your text field doesn’t have spaces in it double clicking will select everything.  
Edit:  
Actually it cant have punctuation or some other non alphanumeric characters.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [April 21, 2022, 9:07pm UTC](https://forum.inductiveautomation.com/t/perspective-text-field-select-all-contains-of-the-text-field-when-clicks-on-it/58717/3 "2022-04-21T21:07:45Z")

</div>

I could not find a way to do exactly what you want, maybe one of the big brains on this forum knows how. An alternate idea that may work for you is to create a double or single click event script that deletes the text automatically.

```auto
	self.props.text = ''
	self.parent.focus()

```

The first line clears the text field, but it doesn’t update until focus is lost, which is what the second line does. I would have thought the deferUpdates property would take care of this, but doesn’t appear to, though that is probably me not understanding what it does (;

---

<div class="post-metadata">

**Author:** ![dhananjay\_vichare](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dhananjay_vichare/32/74712_2.png) [@dhananjay\_vichare](https://forum.inductiveautomation.com/u/dhananjay_vichare)\
**Post date:** [April 21, 2022, 9:45pm UTC](https://forum.inductiveautomation.com/t/perspective-text-field-select-all-contains-of-the-text-field-when-clicks-on-it/58717/4 "2022-04-21T21:45:39Z")

</div>

> [@dhananjay\_vichare](#):
>
> uch screen PC

Solved. Thank you josborn.
