• Lukas Prützel
    March 25, 2020 at 5:41 am #5724


    We want to alter the Label / Text of a Button Element depending on the content of a TextArea Element.

    To give you a better understanding of what we want to achieve and how we implemented it I’ll go into more detail on this:

    The page contains a TextArea and a Button.
    The TextArea contains a On change Event, that should alter the Button Label, as soon as the TextArea is filled with content.

    The code for the on change Event looks like this:

    if (me.getText() == "") {
    } else {

    Thus, we expect the Button to be renamed to “Import” as soon as someone starts typing in the TextArea.
    However, this is not the case. The Label change only occurs as soon as the user clicks out of the TextArea Element.

    Is this a known bug or are we using the Event incorrectly? If we can’t change the Button Label this way, can you demonstrate us a different solution that provides the expected result.

    The issue also occurs when using a text input instead of a Text Area Element.

    Thanks for your help and with best regards,


    SPARK Support
    March 25, 2020 at 10:29 am #5729

    Hi Lukas,

    You may want to try using the On Input event instead.  The event has a “potential” context variable.

    if(potential.length > 0) execute code;


    Stephen P

    Lukas Prützel
    March 26, 2020 at 12:20 am #5730

    Hi Stephen,

    This works perfectly! Thank you for your fast response.



    SPARK Support
    March 26, 2020 at 7:56 am #5747

    You are welcome.


    Stephen P.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search