This topic is locked
[SOLVED]

 HIde Add new & Inline add buttons if record exists

12/29/2011 10:30:01 PM
PHPRunner General questions
A
Athlon author

Followed the guidance and I can get this to work on the icons but not the buttons. After a new record is created I want the Add new and Inline add buttons to be disabled. I have been through the html and tried what I believed to be the correct names to no effect. Any one give me a clue here as to what i am doing wrong.
list page after record processed
if ($data["User_Name"] = "User_Name")

{

$record["edit_link"] = false;

}
works fine... but only for the Icon not the button.
I have tried changing edit_link to add_link and inlineadd_link without success.
Thanks,
Mike.

vin7102 12/29/2011

Athlon,
Just a thought, Try List Page -> Before Display event and see if this works

if ($data["User_Name"] = "User_Name")

{

#---- hide the add / edit / delete buttons --------------------------------

$xt->assign("add_link",false);

$xt->assign("deleteselected_link",false);

}
A
Athlon author 12/31/2011

Thanks for your quick reply - did not notice $xt. Worked perfect, thanks. I am learning all this very slowly.