Feature comparison to themable_forms?

Created on 3 May 2022, over 2 years ago
Updated 1 September 2024, 4 months ago

Comparison

  1. Themable Forms (started in September 2016 by lauriii) is older than formdazzle (started September 2019 by JohnAlbin).
  2. Themable forms β†’ has very few commits and amounts to two template suggestion hooks inside the *.module file providing the following suggestions:

    form-element.html.twig

    form-element--[form-id]--[element-type].html.twig
    form-element--form-id--[form-id].html.twig
    form-element--type--[element-type].html.twig
    form-element.html.twig
    

    form-element-label.html.twig

    form-element-label--[form_id]--[element_type].html.twig
    form-element-label--form-id--[form_id].html.twig
    form-element-label--type--[element_type].html.twig
    form-element-label.html.twig
    

    The rest of the functions in the *.module file deal with exposing variables (like #form_id) to be available to these two template suggestion hooks.

    There are no template suggestions for form.html.twig.

    There are no template suggestions for input.html.twig.

  3. Formdazzle! on the other, hand has many many commits and takes a different approach. It uses the *.module file to register a preprocess_form_element() function, but all the module's business logic is housed in a PHP Class called Dazzler.php. The class has unit tests whereas Themable Forms has no tests (due to its simplistic nature).

    Template suggestions are provided for:

    form.html.twig - special case logic for webforms and views exposed forms

    form--views--[view-id]--[display-id].html.twig
    form--webform-[webform-id].html.twig
    form--[form-id].html.twig
    form.html.twig
    

    form-element.html.twig
    TBD (see project page for examples)

    [element-type]--[form-id]--[form-element-name].html.twig
    

    form-element-label.html.twig
    TBD (see project page for examples)

    [element-type]--[form-id]--[form-element-name].html.twig
    

    input.html.twig

    input--textfield--webform-contact.html.twig
    input--textfield--webform-contact--first-name.html.twig
    input--textfield.html.twig
    input.html.twig
    

Original Summary by @hawkeye.twolf

Honest question, is Formdazzle! significantly different from Themable forms β†’ ? I see that the theme suggestions themselves have a slightly different syntax, but are there deeper functionality differences? If so, it would be great to have those documented on the project page. Thank you John!

πŸ’¬ Support request
Status

Fixed

Version

4.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States hawkeye.twolf α™αŽ©α―αα— Unalatogiyasdi, Tsalaguwetiyi (Cherokee country)

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024