Automatically close form
Hi all,
I've a form with 3 groups. One group ("noAccess") represents users who don't have right to fill the form. As the link "new item" is on a public Intranet page, I can't simply hide this link.
My idea is to show an alert message to the user who click the "new item" link and who is member of the group "noAccess".
For this group, I set a blank form and in the javascript code I wrote :
Thanks for your help & regards,
Steve
I've a form with 3 groups. One group ("noAccess") represents users who don't have right to fill the form. As the link "new item" is on a public Intranet page, I can't simply hide this link.
My idea is to show an alert message to the user who click the "new item" link and who is member of the group "noAccess".
For this group, I set a blank form and in the javascript code I wrote :
Code: Select all
1. Alert("You are not allowed to fill this form.");
2. ??? --> How to close the form automatically ?
Steve
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Do you open the form in a dialog and want to close the dialog after showing the message? If not, just redirect users to another page by using the code:
window.location = 'URL to another page';
window.location = 'URL to another page';
Hi Dmitry,
Thanks for your reply but this doesn't work... The blank form is still displayed without redirection.
An other idea... Would it be possible to show the form with a unique text message (eg "You are not allowed to fill this form.") and a single button "OK" ? Or is it possible to hide the "Save" button and display only the "Cancel" one ?
Thanks for your reply but this doesn't work... The blank form is still displayed without redirection.
An other idea... Would it be possible to show the form with a unique text message (eg "You are not allowed to fill this form.") and a single button "OK" ? Or is it possible to hide the "Save" button and display only the "Cancel" one ?
Hi Rohstev,
this looks exactly is function, which I am looking for .
Could you please share the script with us? I am quite beginner with scripting, so looking for, how to initiate the check and also how to hide / remove the button, if user is not authorized?
Thank you very much
this looks exactly is function, which I am looking for .
Could you please share the script with us? I am quite beginner with scripting, so looking for, how to initiate the check and also how to hide / remove the button, if user is not authorized?
Thank you very much
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests