remove widget button function

Is there anyway to remove the onRelease part of a widget so that the widget still stays on screen but it is deactivated so that it can be activated again? when the string count reaches either 5 or the answer “SHORT” i want all the buttons to still be there but they cant be pressed. Also after the individual button is pressed I want it still to be viewed but cant be pressed and then when the function reset is called i want all the buttons to be active through the onRelease part again. Any help at all would be amazing!

local tButton = widget.newButton

    {

        cornerRadius = 4,

        onRelease = 

        function()

        answerStringCount = answerStringCount +1

        groupT.alpha = 0

        answerString.text = answerString.text…“T”

                if answerString.text == “SHORT” then

                    answerString:setTextColor (winGradient)

                    groupS.alpha = 0

                    groupG.alpha = 0

                    groupO.alpha = 0

                    groupZ.alpha = 0

                    groupH.alpha = 0

                    groupP.alpha = 0

                    groupR.alpha = 0

                    groupU.alpha = 0

                    groupA.alpha = 0

                    groupE.alpha = 0

                    groupT.alpha = 0

                    groupJ.alpha = 0

                elseif answerStringCount == 5 then

                    answerString:setTextColor (lossGradient)

                    timer.performWithDelay (400, reset)

                end

        end,

        id = “tButton1”,

        label = “T”,

        width = 60, height = 60,

        fontSize = 30,

        emboss = true,

        font = “Pieces of Eight”

    }

    groupT:insert( tButton )

    tButton.x = display.contentWidth *.75

    tButton.y = display.contentHeight * .88