webform_civicrm icon indicating copy to clipboard operation
webform_civicrm copied to clipboard

D9/10 - Fix display of contact fields, if hidden in settings

Open jitendrapurohit opened this issue 9 months ago • 0 comments

Overview

Contact field is displayed even if hidden in settings.

Before

To replicate:

  • Create a webform with 2 contacts.
  • Set the type of second contact to Organization and enable Org Name field.
  • Open the Build form, edit the 2nd Existing Contact element: -- Form Widget = Select -- Field to Lock = Name -- Locked Fields should be = Hidden
  • Visit the webform page.
  • Org Name element is still displayed. image
  • Choose an org name, the field is hidden correctly.
  • After reverting the option back to Choose Existing, the field remains hidden correctly. image
  • The issue appears to occur only when the page is visited or loaded.

After

Fixed. The field is hidden on page load too.

Technical Details

triggers the change event on page load.

jitendrapurohit avatar May 07 '24 06:05 jitendrapurohit