Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to disable fields based on login name?

Guest
May 22, 2008 May 22, 2008
Hi

I am using Dreamweaver CS3 to create a small form-based application to demo the Context Sensitive Help feature of Robohelp.

I have to create a form which will have some fields/checkboxes disabled based on the login ID used to access the application.

For example, if Samantha, the Manager, logs on to the Material Order page of an application, she should be able to edit the Material Name, Category, Ship-to location, Supplier Name, ID, and the Price fields. Whereas, if Tom, an Engineer, logs on to same page , he should be able to edit only the Material Name, Category, and Ship-to Location fields.

I want to restrict the fields based on Tom's login ID.

The login page is created using Flash and xml.

I am basically writer trying to learn a bit of coding. So, please suggest the simplest method.

Thanks.

Sreekanth

TOPICS
Server side applications
294
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2008 May 22, 2008
You can use your scripting to add

disabled="disabled"

to the fields you want disabled, depending on the login.

<input disabled="disabled"

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Whatever..." <webforumsuser@macromedia.com> wrote in message
news:g14c93$hlk$1@forums.macromedia.com...
> Hi
>
> I am using Dreamweaver CS3 to create a small form-based application to
> demo
> the Context Sensitive Help feature of Robohelp.
>
> I have to create a form which will have some fields/checkboxes disabled
> based
> on the login ID used to access the application.
>
> For example, if Samantha, the Manager, logs on to the Material Order page
> of
> an application, she should be able to edit the Material Name, Category,
> Ship-to
> location, Supplier Name, ID, and the Price fields. Whereas, if Tom, an
> Engineer, logs on to same page , he should be able to edit only the
> Material
> Name, Category, and Ship-to Location fields.
>
> I want to restrict the fields based on Tom's login ID.
>
> The login page is created using Flash and xml.
>
> I am basically writer trying to learn a bit of coding. So, please suggest
> the
> simplest method.
>
> Thanks.
>
> Sreekanth
>
>
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 22, 2008 May 22, 2008
LATEST
Create a user table in your database that contains levels that list the
user's IDs with their access level assigned.

Then, when you create your login on the actual page, using Dreamweaver,
you specify an access level for each of the items on the page by
surrounding them with an "if statement":

If user level = 1 or 2 or 3, display. if user level 1 display, if user
level 3 or 2 display...

That's the basic logic I would probably use. Other people may have
better ideas.

Here's an example of what I've done on the page. It's a page where I
display downloadable files based on their access level.

I use Dreamweaver's login session that is created when you apply the
built in login extension.

<%
IF (Session("MM_UserAuthorization") = "2" or
Session("MM_UserAuthorization") = "3") Then%>
<div>content goes here </div>
<%End If%>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines