SuiteCRM 8 frontend required field logic not working with multiple values in activeOnFields

Hello Community,

I am working on SuiteCRM 8 frontend field logic and facing an issue with the required logic when using multiple values in activeOnFields.

I followed the official documentation exactly:
https://docs.suitecrm.com/8.x/developer/extensions/frontend/logic/field-logic/fe-extensions-required-logic/#_field_dependencies

Use case

I want a field to be required when a dropdown field (repeat_task) has value Daily OR Weekly.

Field definition

array(
    'name'  => 'end_repeat_task',
    'label' => 'LBL_END_REPEAT_TASK',
    'logic' => [
        'required' => [
            'key'   => 'required',
            'modes' => ['edit', 'create'],
            'params'=> [
                'fieldDependencies' => ['repeat_task'],
                'activeOnFields' => [
                    'repeat_task' => ['Daily', 'Weekly'],
                ],
            ],
        ],
    ],
),

Expected behavior

The field end_repeat_task should become required when:

  • repeat_task = Daily OR

  • repeat_task = Weekly

Actual behavior

  • Works correctly when only one value is used:

    'repeat_task' => ['Daily']
    
    
  • Does not work when multiple values are added:

    'repeat_task' => ['Daily', 'Weekly']
    
    

I also tried:

  • Multiple equals operators

  • Separate required conditions

  • Clearing cache and rebuilding frontend

  • Pure frontend logic (no backend validation)

But the OR behavior with multiple values still does not work.


Questions

  1. Is this a known limitation or bug in SuiteCRM 8 frontend field logic?

  2. Is activeOnFields supposed to support OR conditions with multiple values for dropdowns?

  3. Is there an official or recommended workaround?

Any clarification from the core team or community would be greatly appreciated.

Thank you.

Anyone have any idea for the above query.
please help

I have encountered this bug before BUT the seperate required operators should work so I would double check your code for that one that would need to look like this:

'required' => [
            'key'   => 'required',
            'modes' => ['edit', 'create'],
            'params'=> [
                'fieldDependencies' => ['repeat_task'],
                'activeOnFields' => [
                    'repeat_task' => ['Daily'],
                ],
            ],
        ],
'required2' => [
            'key'   => 'required',
            'modes' => ['edit', 'create'],
            'params'=> [
                'fieldDependencies' => ['repeat_task'],
                'activeOnFields' => [
                    'repeat_task' => [ 'Weekly'],
                ],
            ],
        ],

Mark