Improving CivicTheme form element rendering system

Created on 12 November 2024, 2 months ago

Problem/Motivation

Currently, when CivicTheme encounters a form element that it does not support it renders a default textfield form input. This happens with non-standard form elements that are rendered on the front-end.

When I add conditional elements for webforms and they are not showing / hiding based on conditions as expected

When I add markup fields from webform and note that they do not render correctly.

Steps to reproduce

Add conditional elements for webforms and note that they are not showing / hiding as expected.

Add markup fields from webform and note that they do not render correctly.

Proposed resolution

1. Create an opt-in system (setup in CivicTheme) that allows Drupal to provide templates for form elements that are not directly supported CivicTheme.
2. Update the form preprocessing system to allow attributes to be correctly added by modules and form builder layers by Drupal and are not restricted.

PR for community review / feedback: https://github.com/civictheme/monorepo-drupal/pull/1306

User interface changes

API changes

No API changes, this should work as expected

Data model changes

No Data model changes

🐛 Bug report
Status

Active

Version

1.8

Component

Code

Created by

🇦🇺Australia RichardGaunt Melbourne

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024