# KIOSK text field in perspective

**URL:** <https://forum.inductiveautomation.com/t/kiosk-text-field-in-perspective/105212>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 17, 2025, 4:11am UTC](https://forum.inductiveautomation.com/t/kiosk-text-field-in-perspective/105212 "2025-04-17T04:11:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maryam\_Saeed](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Maryam\_Saeed](https://forum.inductiveautomation.com/u/Maryam_Saeed)\
**Post date:** [April 17, 2025, 4:11am UTC](https://forum.inductiveautomation.com/t/kiosk-text-field-in-perspective/105212/1 "2025-04-17T04:11:26Z")

</div>

I have a system with kiosk screens. When I tap my card it also enters a line itself in my value. I am using a text field and have 3 conditions to follow,

1. If my length is \< custom property altMax then my text field should refresh after 20 seconds as my user will be entering value manually
2. If my length == altMax then my text field should refresh after 5 seconds
3. If my text field contains a value and my user leaves the screen the text field should be back to " "

Here is a code that was working for the first two conditions

```python
def valueChanged(self, previousValue, currentValue, origin, missedEvents):

    # Ensure the field does not take more than altMax characters
    self.props.text = self.props.text[:self.custom.altMax]

    # Import the necessary function for delayed execution
    from threading import Timer

    # Define a function to reset the value
    def reset_value():
        # Set the value to an empty string
        self.props.text = ""

    # Check the length of the currentValue
    if len(currentValue.value) < self.custom.altMax:
        # Set the timer for 20 seconds (20000 milliseconds)
        Timer(20.0, reset_value).start()
    else:
        # Set the timer for 5 seconds (5000 milliseconds)
        Timer(5.0, reset_value).start()

```
