Dynamic control on form submission

I want to close the form when a certain number of data is submitted.

But it seems I can’t dynamically enable or disable form submission.

Hope there is the feature to open/close a form dynamically.

What’s the purpose behind closing it? Would it be good enough to inform the user that the form is closed and then filter out all submissions after a certain date and time?

In order to make clear that the survey is closed for users automatically.

I don’t think your approach is a good solution.
It looks confused for users that the answer to the survey, which is open, is not valid.

And every service like Google Form or Survey Monkey has the feature to close the form.

Yeah I agree it’s not ideal I’m just looking for workarounds

You can have a column in the form source table that is a formula that will output in the form if you display it. Perhaps you could have a formula that displays a message, image, etc telling them it is open (instructions on form) or closed, and set this to be the first column so people see it right away.