Anyone using 2026 had a problem with ListOptions_Rendered & Row_CustomAction
trying Example 2 but nothing happed when you click on add star.
function ListOptions_Rendered(): void
{
$this->ListOptions["new"]->Body = "<a href=\"#\" onclick=\"return ew.submitAction(event, {action: 'star', method: 'ajax', msg: 'Add star?', key: " . $this->keyToJson(true) . "});\">Add Star</a>";
}
To run the inline onclick event, Use content security policy (CSP) need to be disabled.
is there a way with CSP enable to use this feature?
mobhar
April 17, 2026, 4:51pm
3
Then you may try Example 3 or Example 4 under Page_Load server event of List Page.
i have tried the following but the link will not show in the drop down for that row
// Page Load
public function pageLoad(): void
{
$this->CustomActions["custom_call"] = new ListAction(
"custom_call",
"Call",
Allowed: IsLoggedIn(),
Method: ActionType::AJAX,
Select: ActionType::CUSTOM,
ConfirmMessage: "Proceed with this action?",
Icon: "fa-solid fa-phone ew-icon",
Success: "reloadPage"
);
}
// List Options Load
public function listOptionsLoad(): void
{
$opt = $this->ListOptions->add("custom_call");
$opt->Header = "Call";
$opt->OnLeft = true;
}
// List Options Rendered
public function listOptionsRendered(): void
{
if (!isset($this->ListOptions->Items["custom_call"])) {
return;
}
if ($this->Status->CurrentValue === "Accepted") {
$this->ListOptions->Items["custom_call"]->Body =
'<a href="#" data-action="custom_call" data-key="' .
HtmlEncode($this->KeyToJson(true)) .
'">Call</a>';
} else {
$this->ListOptions->Items["custom_call"]->Body = "";
}
}
many thanks for comfirming.
is there no way to change the action based on the field value?
just did 2 ListAction and handed this in rowCustomAction
thanks for the pointer