Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-1655

Drupal form element name collides between XML forms and datepicker




      XML forms defines a datepicker element for use: https://github.com/Islandora/islandora_xml_forms/blob/7.x/elements/xml_form_elements.module#L54-L59. The Drupal contrib module datepicker also defines a datepicker element http://cgit.drupalcode.org/datepicker/tree/datepicker.module?h=7.x-1.x#n6.

      The islandora_usage_stats module requires datepicker to be enabled to use datepicker_views for some date filtering functionality. As such when islandora_usage_stats and islandora_xml_forms are present on the same box install things collide and won't work as expected.

      The Drupal date module supplies a date_popup module which provides the same functionality with an added time element. The common thread between islandora_xml_forms, datepicker and date_popup is they all utilize the same datepicker JS functionality so UI wise not much differs.
      Similarly using the '#timepicker' => FALSE option on date_popup will render an identical element to islandora_xml_forms datepicker element functionality and all. The problem lies in that these custom properties aren't exposed to be set through formbuilder.

      As such I see a couple of potential courses of action:
      -Document around this (probably not the best)
      -Deprecate and remove the element from islandora_xml_forms
      -Rename the existing element within islandora_xml_forms to be unique

      Grepping through all of core Islandora none of the forms/anywhere else are using an element type of '#datepicker'. However, some dgi clients do have instances of these in their forms albeit not using islandora_usage_stats in tow.




            • Assignee:
              jordandukart Jordan Dukart
              jordandukart Jordan Dukart
            • Votes:
              1 Vote for this issue
              5 Start watching this issue


              • Created: