Need some bash and YAD help

I’m trying to learn some bash scripting and I’m creating a small script. I’m using bash + YAD to create this. I’ve figured out a lot of it thanks to @manuel. I want to do a small check on an input field. Which managed to get working but I can’t figure out how to relaunch the same UI after clicking on ok.

ftNameRepo(){
    local text=""
    text+="Enter the name of the sofwate you want to search\n"
    text+="in the official repository."

    local nme=(
        yad --form --align-buttons --use-interp --title="Software Name" \
        --text="$text" --field="Name:" --button="Search!gtk-search!Click to search":0
    )
    local name="$("${nme[@]}" | cut -d '|' -f1)"

    if [[ name -ne "" ]]; then

        case "$?" in
            0) RunInTerminal pacman -Ss "$name" ;;
        esac

    else
        yad --image="error" --text="Name fiels cannot be empty" \
        --title="Empty Field" --text-align=left --width=300 \
        --button="Close!gtk-close!Click to close.":0

      #This part I'm trying to go back to the enter software screen. After clicking on ok button of the above message.
        case "$?" in
            0) $(nme) ;;
        esac
    fi
}
export -f sftNameRepo

I want to relaunch the,

local nme=(
        yad --form --align-buttons --use-interp --title="Software Name" \
        --text="$text" --field="Name:" --button="Search!gtk-search!Click to search":0
    )

When the user clicks ok on the below message.

 yad --image="error" --text="Name fiels cannot be empty" \
        --title="Empty Field" --text-align=left --width=300 \
        --button="Close!gtk-close!Click to close.":0

      #This part I'm trying to go back to the enter software screen. After clicking on ok button of the above message.
        case "$?" in
            0) $(nme) ;;
        esac