Store the value of the 'mod' variable (either as a global variable / write the value to a text file / store the value in the registry), and then test this stored value when displaying the dialog, configuring the tiles appropriately.
Currently the edit box will be disabled by default [(mode_tile "str" 1)].