I have notice that my users have open more forms at once which is not acceptable according to app workflow and change/delete data from repeat groupe in some point. I have to prevent users to open multiple forms.
So, I thing I can do it using js plugin and ajax. Here is the plan:
1. onLoad form/list: read session from browser then get user ID and session_id for this user from db and store session value in browser LocalStoreg and set flag
So if user open new tab -> session === session_id and flag === 1 -> window.close.
2. onUnload unset flag in LoacalStorage
Problem is if user close browser or tabs by clicking X in browser LocalStorage the flag stay set and user can not open any form. He must wait until session expires.
Is there another way to prevent open multiple forms?
So, I thing I can do it using js plugin and ajax. Here is the plan:
1. onLoad form/list: read session from browser then get user ID and session_id for this user from db and store session value in browser LocalStoreg and set flag
So if user open new tab -> session === session_id and flag === 1 -> window.close.
2. onUnload unset flag in LoacalStorage
Problem is if user close browser or tabs by clicking X in browser LocalStorage the flag stay set and user can not open any form. He must wait until session expires.
Is there another way to prevent open multiple forms?