jaggernat
asked on
Designing Login forms using domcfg.nsf
Hi ,
I want to know if this is possible and if it is ,how do i proceed?
I am designing a job search website. In one of the forms , i have a hotspot button called "Login" . Once the user clicks on login, i want the user to see the customized login form that i have created in domcfg.nsf.
Now, Once th user enters username and password , it should authenticate the user and take her to her job profile form.
How can i do this?
thanks,
Jay
I want to know if this is possible and if it is ,how do i proceed?
I am designing a job search website. In one of the forms , i have a hotspot button called "Login" . Once the user clicks on login, i want the user to see the customized login form that i have created in domcfg.nsf.
Now, Once th user enters username and password , it should authenticate the user and take her to her job profile form.
How can i do this?
thanks,
Jay
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You really have two questions:
1) How to use a custom login instead of the default
2) How to direct the user to a specific page upon login
Hemantha has answered the first part. (Note: You usually have a server-wide custom login, and you USUALLY put it in the domcfg.nsf, but it can reside elsewhere. The key is to specify a "Mapping a login form" on the domcfg.nsf CREATE document menu.)
As to the second part...
This depends on how you have set up profiles. For example, if there is a separate database containing profiles, and each profile has a readers name field, so that most users will have only one document available to them in the database, you coudl simply do this:
Set the database Anonymous access to No Access
Create a view of all documents in the DB
Specify a URL of /profilesdb.nsf/nameofthev iew/$First
When the user clicks on thelink before logging in, Domino will recognize that the ACL prevents the user from getting in, and will force authentication. The authentication page keeps track of the URL the user was trying to reach, and on successful login, will direct the user to that page. So, after logging in, the usre is back at /profilesdb.nsf/nameofthev iew/$First . That URL attenpts to open the first document shown in the view, which will always be the user's own profile, since taht is the only document the user can see.
1) How to use a custom login instead of the default
2) How to direct the user to a specific page upon login
Hemantha has answered the first part. (Note: You usually have a server-wide custom login, and you USUALLY put it in the domcfg.nsf, but it can reside elsewhere. The key is to specify a "Mapping a login form" on the domcfg.nsf CREATE document menu.)
As to the second part...
This depends on how you have set up profiles. For example, if there is a separate database containing profiles, and each profile has a readers name field, so that most users will have only one document available to them in the database, you coudl simply do this:
Set the database Anonymous access to No Access
Create a view of all documents in the DB
Specify a URL of /profilesdb.nsf/nameofthev
When the user clicks on thelink before logging in, Domino will recognize that the ACL prevents the user from getting in, and will force authentication. The authentication page keeps track of the URL the user was trying to reach, and on successful login, will direct the user to that page. So, after logging in, the usre is back at /profilesdb.nsf/nameofthev
ASKER
hello guys,
sorry for the little delay..
I had this simple question. In my R5 databse , there is a button in my form which has the following formulae
@command([toolstunmacro]; "agentname") with the agent named "agentname"
when i open the form on the browser and click the button, it says "form processed" instead of running the agent.
Agent properties are:
name : agentname
shared agent
run all documents in database
use @command
any help would be greatly appreciated.
thanks,
Jay.
sorry for the little delay..
I had this simple question. In my R5 databse , there is a button in my form which has the following formulae
@command([toolstunmacro]; "agentname") with the agent named "agentname"
when i open the form on the browser and click the button, it says "form processed" instead of running the agent.
Agent properties are:
name : agentname
shared agent
run all documents in database
use @command
any help would be greatly appreciated.
thanks,
Jay.
in your form create a $$Return field.
And the default value should be:
"Your form is processed. Thank you for visiting."
the above message will be displayed. And you can specify where to redirect also.
And the default value should be:
"Your form is processed. Thank you for visiting."
the above message will be displayed. And you can specify where to redirect also.
in the $$Return Field, u can use below options:
Redirecting to:
a view:
"[/" + @ReplaceSubstring( @Subset(@DbName;-1) ; "\\" : " " ; "/" : "+") + "/" + "YourViewname"+ "?OpenView]"
a form:
"[/" + @ReplaceSubstring( @Subset(@DbName;-1) ; "\\" : " " ; "/" : "+") + "/" + "YourFormname"+ "?Openform]"
Hope u got it.
Redirecting to:
a view:
"[/" + @ReplaceSubstring( @Subset(@DbName;-1) ; "\\" : " " ; "/" : "+") + "/" + "YourViewname"+ "?OpenView]"
a form:
"[/" + @ReplaceSubstring( @Subset(@DbName;-1) ; "\\" : " " ; "/" : "+") + "/" + "YourFormname"+ "?Openform]"
Hope u got it.
ASKER
yes i got it,,,but how do i know the agent has executed at the background ....
the agent is supposed to create a person document in names.nsf.
this is a part of the code :
<<<< Set db = session.GetDatabase("", "names.nsf")
Set view = db.GetView("($Users)")
Set persDoc = view.GetDocumentByKey(doc. UserName(0 ))
If (persDoc Is Nothing) Then
Call doc.Save(True, False)
Print "[/" & session.CurrentDatabase.Fi lePath & "/ThankYou?OpenPage]"
Exit Sub
Else
doc.Message = "Person Document for this UserName already exist."
Exit Sub
End If
Exit Sub
>>>>>>>
So now the problem is that when user clicks the createprofile button, it should create a profile by the username. Incase username already exists, it should say "person document already exists".
thanks,
J
the agent is supposed to create a person document in names.nsf.
this is a part of the code :
<<<< Set db = session.GetDatabase("", "names.nsf")
Set view = db.GetView("($Users)")
Set persDoc = view.GetDocumentByKey(doc.
If (persDoc Is Nothing) Then
Call doc.Save(True, False)
Print "[/" & session.CurrentDatabase.Fi
Exit Sub
Else
doc.Message = "Person Document for this UserName already exist."
Exit Sub
End If
Exit Sub
>>>>>>>
So now the problem is that when user clicks the createprofile button, it should create a profile by the username. Incase username already exists, it should say "person document already exists".
thanks,
J
Set db = session.GetDatabase("", "names.nsf")
Set view = db.GetView("($Users)")
Set persDoc = view.GetDocumentByKey(doc. UserName(0 ))
If (persDoc Is Nothing) Then
Call doc.Save(True, False)
Print "[/" & session.CurrentDatabase.Fi lePath & "/ThankYou?OpenPage]"
Exit Sub
Else
Print "Person Document for this UserName already exist."
Exit Sub
End If
Exit Sub
try the above.
or u can use alert also.
Set view = db.GetView("($Users)")
Set persDoc = view.GetDocumentByKey(doc.
If (persDoc Is Nothing) Then
Call doc.Save(True, False)
Print "[/" & session.CurrentDatabase.Fi
Exit Sub
Else
Print "Person Document for this UserName already exist."
Exit Sub
End If
Exit Sub
try the above.
or u can use alert also.
So eg. /db.nsf?open&login or /db.nsf/myagent?open&login
Tom