Stevebenson223
Member
Is there any way to force a user to click the Save button once they have opened a form?
Here's my situation: I have a list with a dropdown containing all the official roles in my organisation, plus a usergroup field so that each role has a specific usergroup. Once usergroups are assigned to roles, there is also a databasejoin dropdown linked to the User list, so you assign a role to a user and they automatically are added to the relevant usergroup.
The form has a php plugin which uses OnAfterProcess to insert the usergroup into the user’s record. This works perfectly.
Now, if a new user takes over that role, the form is edited and they get the usergroup. HOWEVER, I also need to remove the usergroup from the previous incumbent. So I have a second php plugin which uses OnBeforeLoad to delete the usergroup from the existing user’s record, before the other plugin comes into effect. This works perfectly too!
However, from a UX perspective, there is a slight glitch: if an unsuspecting user goes to edit a record but then closes the record without saving it (maybe they clicked the Edit button by mistake), the OnBeforeLoad instruction will have removed the usergroup from the User. If they click Save there’s no problem.
I’ve tried every alternative instruction on both php plugins but none work better.
So unless anyone has any ideas on how this can be achieved via the php plugin, my alternative is to prevent the foolish user from closing the form without clicking Save. Hence my opening question.
Here's my situation: I have a list with a dropdown containing all the official roles in my organisation, plus a usergroup field so that each role has a specific usergroup. Once usergroups are assigned to roles, there is also a databasejoin dropdown linked to the User list, so you assign a role to a user and they automatically are added to the relevant usergroup.
The form has a php plugin which uses OnAfterProcess to insert the usergroup into the user’s record. This works perfectly.
Now, if a new user takes over that role, the form is edited and they get the usergroup. HOWEVER, I also need to remove the usergroup from the previous incumbent. So I have a second php plugin which uses OnBeforeLoad to delete the usergroup from the existing user’s record, before the other plugin comes into effect. This works perfectly too!
However, from a UX perspective, there is a slight glitch: if an unsuspecting user goes to edit a record but then closes the record without saving it (maybe they clicked the Edit button by mistake), the OnBeforeLoad instruction will have removed the usergroup from the User. If they click Save there’s no problem.
I’ve tried every alternative instruction on both php plugins but none work better.
So unless anyone has any ideas on how this can be achieved via the php plugin, my alternative is to prevent the foolish user from closing the form without clicking Save. Hence my opening question.