Uploaded image for project: 'PUBLIC - Liferay Portal Web Content Experience'
  1. PUBLIC - Liferay Portal Web Content Experience
  2. WCM-572

Multiple select field is not working in custom rule

    Details

      Description

      1. Create a new custom rule for the Audience Targeting application that has a multiple select field in it's template (You can copy the built-in rule-os rule and add multiple=true to it's select field in the template. There is a sample ct_fields.ftl attached to this ticket.)
      2. Deploy the rule, start the portal and create a user segment with your new rule
      3. Select more than one options and save the user segment

      Result: If you check the database or open the user segment for edit again, you can see that only the first selected option was considered and saved.

      At the Javascript layer the AudTarg application uses it's own custom form builder field (defined in ct_form_builder.js) and it directly extends Alloy's FormBuilderField. However, only FormBuilderMultipleChoiceField can be set as multiple, which is also a child of FormBuilderField. This means that even if we render a multiple select field from the template, the JS component can't be made aware of this so it will only use the first selected field.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                2.0
                1.1.4