Read only account fields

We have several clients that would like to have some fields on the personal information web site screen read only. In system setup ->set up customer web components ->  personal information configuration you can make member type read only but that is the only one. Does anyone have any suggestions regarding making fields read only on the web?

Thank you in advance for your time,

Paige

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Sample Code

 

Hi Paige,

See some sample code below that we used for a client on the personal page in public view. Of course if you modify the Personal.aspx page you will need to consider this every time you apply a patch or upgrade. We have started to implement these types of changes to the page in an HTTP Module that drops the required code on the page dynamically and does not require modifying the out of the box page. I hope this helps.

Thanks

Joe

 

<

script runat="server"> override void OnPreRender(EventArgs e)DropDownList ddl;TextBox t;DropDownList) Page.FindControl("ctl00$TemplateBody$ddMemberTypes");if (ddl != null)false;Color.LightGray;TextBox)Page.FindControl("ctl00$TemplateBody$txtCompany");if (t != null)true;Color.LightGray;TextBox)Page.FindControl("ctl00$TemplateBody$txtMajorKey");if (t != null)true;Color.LightGray;DropDownList)Page.FindControl("ctl00$TemplateBody$ddChapter");if (ddl != null)false;Color.LightGray;

</

script>

protected

{

 

 

 

ddl = (

 

{

ddl.Enabled =

ddl.BackColor = System.Drawing.

}

t = (

 

{

t.ReadOnly =

t.BackColor = System.Drawing.

}

 

t = (

 

{

t.ReadOnly =

t.BackColor = System.Drawing.

}

ddl = (

 

{

ddl.Enabled =

ddl.BackColor = System.Drawing.

}

}

looks like some code is missing?

Joe,

Did some of the source code get swallowed up in your Web browser?

Hey Paige, Did you get this

Hey Paige,

Did you get this sorted out as I am trying to do something similar as well.

Personal.aspx read only fields

Can you repost the sample code please?  Trying to make a textbox read only.

 

textbox read only

Was able to get it done simply by not enabling the corrresponding textbox. 

Mary.

 

k

How you manage that?

Scenario: for a certain

Scenario:

for a certain field supress a field so that user cannot enter a value  in page core/accountmangement/personal.aspx.

Solution: enabled set to false

<asp:label id="lblMajorKey" runat="server" Enabled="false" CssClass="formField">Major Key</asp:label></td>
                <td class="PanelTableValue">