Skip to content

restructure forms #18

Description

@raffaelj

The structure grew over time with multiple changes in the Multiplane files and in the FormValidation addon. At first, I didn't think about the possibility to have multiple forms on the same page. I only had types of forms in mind (contact form, newsletter subscription, comment section)...

to do

  • move html helper functions to a helper class
  • add js to use the form with ajax requests and client side validation (it still must work without js!)
  • all form parts should be in one location (or in less, clearly arranged locations), maybe as own module/addon
    • partials in rljbase theme
      • /widgets/contactform.php
      • /partials/form.php
      • /partials/formfields/*.php
    • /module/forms.php
    • /Controller/Forms.php
  • move some php from partials to controller/helper
  • improve multilingual forms
    • all form labels and info texts are translated via config i18n file
    • form field contents should be translatable, too
    • translations should be in FormValidation addon instead of i18n file, so it doesn't break when users change the forms
  • document, how to use the FormValidation addon with CpMultiplane

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions