开发者

Hide form forever once submitted

Is it possible to create a form that only displays if the user hasn't ever completed it?

开发者_如何学Python

Once it has been completed, the form should never display again.

Thanks


In order to achieve this you will need some way to track users. Depending on how your site is designed there are different ways to achieve this.

If in order to submit the form the user has to be authenticated you could associate some flag with the current user indicating if he already submitted the form. So before showing the form you check the flag and show the form to the user. Once he submits it you update the flag so that the next time the user tries to load the form the application will known that he already submitted it.

If it is anonymous site you could use cookies to track users. Remember that cookies could be disabled, deleted, manipulated by the user so this is not a reliable way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜