govCMS / GovCMS8

Current stable release of the main GovCMS8 distribution.
GNU General Public License v2.0
60 stars 58 forks source link

Allow theme implements hook_field_widget_multivalue_form_alter #538

Closed tannguyen04 closed 3 years ago

tannguyen04 commented 4 years ago

Hi We already allowed theme implement hook_field_widget_form_alter. Can we allow theme implements hook_field_widget_multivalue_form_alter too ? For some case, admin theme need to alter field widget multiple value form to improve editor experience.

I have create a patch https://patch-diff.githubusercontent.com/raw/govCMS/GovCMS8/pull/539.patch

Thank you.

joshua-graham-adelphi commented 4 years ago

Second this - good for theming multivalued paragraphs in forms.

joshua-graham-adelphi commented 3 years ago

539 - Linking the pull request.

pandaskii commented 3 years ago

@joshua-graham-adelphi Good point, the same requests could be happened to GovCMS 2.x (D9) as well

I will make sure at least hook_field_widget_form_alter being ported

joshua-graham-adelphi commented 3 years ago

Thanks.

I note that the function is Deprecated in Drupal 9.2.x - and should use hook_field_widget_single_element_form_alter() instead.

@see https://api.drupal.org/api/drupal/core%21modules%21field%21field.api.php/function/hook_field_widget_form_alter/9.2.x

pandaskii commented 3 years ago

Well noted thanks @joshua-graham-adelphi :)

tannguyen04 commented 3 years ago

Thanks @joshua-graham-adelphi for you information.

joshua-graham-adelphi commented 3 years ago

hi @tannguyen04 - any plan to implement this?