Can I limit access to a form to just certain users?

M

Meg

I developed a form for training and I would like to know if I can limit
access to just certain users?
 
S

S.Y.M. Wong-A-Ton

What kind of access to you have in mind? Access can be set on a network level
down to roles in a form. If you want to keep it simple, you can publish the
form template to a network location that is only accessible by the users who
you want to allow to use the form.
 
M

Meg

I guess I can get our network people to limit the access. I guess I was
thinking I could set up a UserID and Password for each person. Am I thinking
wrong?

Thanks,

MEG
 
S

S.Y.M. Wong-A-Ton

No, you could, but it is not easy to set up, since you would have to build
(read: code) it in yourself using a task pane that has a way to check
usernames/passwords against a data store containing credentials.
 
M

Meg

Thanks I read and copied the code yesterday and it did work, but I just done
the password.html.

However, I am not sure I understand how it works exactly.
Can a user change their own password and/or where exactly does it store the
passwords, etc? do you know?

Thanks,

MEG
 
S

S.Y.M. Wong-A-Ton

Which code did you copy?
---
S.Y.M. Wong-A-Ton


Meg said:
Thanks I read and copied the code yesterday and it did work, but I just done
the password.html.

However, I am not sure I understand how it works exactly.
Can a user change their own password and/or where exactly does it store the
passwords, etc? do you know?

Thanks,

MEG
 
M

Meg

Here is the code I copied:

<html>
<head>
<script language="javascript">
var thisXDocument = null;
function initialize()
{
thisXDocument = window.external.Window.XDocument;
}
function changeView()
{
var userName = tbUser.value;
var password = tbPassword.value;
/*Access your database to find out if the logged in user is
a valid user or not. */
thisXDocument.View.SwitchView("Main Form");
}
</script>
</head>
<body onload="initialize()">
<table>
<tr>
<td>
Username:
</td>
<td>
<input type="text" name="tbUser" id="tbUser" size="15">
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="tbPassword" id="tbPassword"
size="16">
</td>
<tr>
<td></td>
<td>
<input type="submit" value="Submit"
onclick="changeView();">
</td>
</tr>
</table>
</body>
</html>

Thanks,

MEG
 
S

S.Y.M. Wong-A-Ton

The code does not seem to contain anything to retrieve/store user names and
passwords. Where the comment

/*Access your database to find out if the logged in user is a valid user or
not. */

is located, is where you have to write your own code to find and check the
user's credentials.
 
M

Meg

Thanks so much for your help. I write some code but not much and it would
certainly take me forever to write this. Do you by any chance have an
example of code of what I would write to do this?

MEG
 
S

S.Y.M. Wong-A-Ton

Unfortunately, I do not have an example of this, since I've never done it.
Where did you get the code. Did the site or book not list an example?

I guess it all depends on what data store you're accessing. Currently, I do
not see an easy way to call such code from javascript embedded in an HTML
page. Have you already tried searching the web on "retrieve records database
javascript" or something similar?
 
M

Meg

I copied it I thought from someone on this site, however I am not sure. I
don't think I need it now, because I gave access to only certain people on
the network.

anyway I may do some more searching after I get this form done.

Thanks,

MEG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top