set modal element at initialization time