Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-125960

Custom Form Field Settings Breaks when using form Rules



      Steps to Reproduce:

      1. Create a custom field that includes a custom setting or use this one
      2. Deploy the custom field to Liferay
        • If you are using the jar above, copy the jar to LIFERAY_HOME/osgi/modules and start the portal
      3. Go to Content & Data > Forms -> Add a new Form
      4. Add the custom field
        • If you are using the jar above, the custom field will be:
        • And it will have the following custom setting:
      5. Add a text field and a numeric field to the form
      6. Go to Rules
      7. Create a Rule: If Text Field is not empty, Show Numeric Field
      8. Save Rule
      9. Publish the form
      10. Go to the published form
      11. Make sure that the custom field renders it's custom setting correctly 
        • If you are using the jar above, the custom setting will be the character limit. So, type in the custom field until you reach the character limit defined in the form builder.
      12. Type in the text field in order to activate the form rule.

      Expected Result:

      • The numeric field should be displayed and the custom form field should be unaffected.

      Actual Result:

      • The numeric field is displayed, but the custom form field no longer renders it's custom setting correctly because the setting is not returned in the api response.
        • If you are using the jar above: It is no longer possible to type in the custom field.


      This issue was initially reported here: https://issues.liferay.com/browse/PTR-2163

      NOTE: When a form rule is activated a new form context is returned by an api call '/o/dynamic-data-mapping-form-context-provider/'. This api call eventually get's here while creating the form context. It looks like while creating the context it will only add settings that it knows about, which excludes my new setting.


        1. BugCustomField.mov
          7.69 MB
        2. CharacterLimit.png
          217 kB
        3. com.liferay.dynamic.data.mapping.form.custom.field.jar
          16.89 MB
        4. CustomFieldLabel.png
          299 kB
        5. Fixed_CustomField.png
          102 kB



            cleyton.magalhaes Cleyton Magalhaes (Inactive)
            evan.thibodeau Evan Thibodeau
            Participants of an Issue:
            Recent user:
            Yunlin "Steven" Sun
            Engineering Assignee:
            Carolina Barbosa
            0 Vote for this issue
            0 Start watching this issue


              Days since last comment:
              18 weeks, 3 days ago


                Version Package
                7.2.10 DXP FP11
       DXP SP4
                7.3.10 DXP FP1
       DXP SP1
                7.3.6 CE GA7