append modal widget automatically