Skip to content
Snippets Groups Projects
Commit e9b99ff2 authored by eileen's avatar eileen
Browse files

Title is only required if name is false

parent 0f589cef
Branches
Tags
No related merge requests found
......@@ -25,7 +25,7 @@ class ActionScheduleSpecProvider extends \Civi\Core\Service\AutoService implemen
*/
public function modifySpec(RequestSpec $spec) {
if ($spec->getAction() === 'create') {
$spec->getFieldByName('title')->setRequired(TRUE);
$spec->getFieldByName('title')->setRequiredIf('empty($values.name)');
$spec->getFieldByName('name')->setRequired(FALSE);
$spec->getFieldByName('mapping_id')->setRequired(TRUE);
$spec->getFieldByName('entity_value')->setRequired(TRUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment