This topic is locked

Hiding/Disabling other field

2/12/2008 6:36:00 PM
PHPRunner General questions
mic'',) author

How can I disable/enable another field according to UserID. Thanks

J
Jane 2/13/2008

Hi,
you can do it editing page on the Visual Editor tab -> HTML mode.

Here is a sample for add page:

{if $userid=="admin"}

<TR><TD>FieldName</TD>

<TD>{build_edit_control field="FieldName" mode="add" value=$value_FieldName}</TD></TR>

{/if}


Then assign UserID to $userid variable on the Add page: Before display event on the Events tab:

$smarty->assign("userid",$_SESSION["UserID"]);

mic'',) author 2/13/2008

Thanks Jane. I'll wait the final release of PHP Runner 4.2.