Coder Social home page Coder Social logo

contao-form-bundle's People

Contributors

bezin avatar cboelter avatar dmolineus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

contao-form-bundle's Issues

Using Translations for the fields

I'm not really that this is a bug or a user problem :-) ... to have translations for my fields I'm currently using stuff like this.

->add(
'field',
 TextType::class,
[
  'label'        => $this->translator->trans(
      'test.form.sale_upload.promotion.0',
      [],
      'contao_test',
      'de'
    ),
....

If I leave the label and help options blank, the label is not rendered in the frontend. I excepted something like field-name as label. Is it possible to use the Fields without a label in the config and using the translator directly in the form_theme?

DCA-Mapping

Hi @dmolineus ,

I just took a look into your bundle. It seems to be (or to be in the future) what we need.

For contao 3 we wrote a module called https://github.com/heimrichhannot/contao-formhybrid which (besides a bunch of other functionality which we wouldn't want to migrate to a bundle...) takes a dca configuration and renders it as a form.

The main issues of the module are:

  • too much code in one module -> the new bundle needs to be way more modular
  • all configuration in tl_module -> problem in Contao 4.9 with InnoDB because of row size limit

So we considered writing a form mapper from dca to symfony forms and found your bundle now.

In the roadmap I can see that this feature is planned and there's also a branch for that.

Is there some time of schedule for the time horizont this feature might get implemented?

Thanks!

Ciao Defcon0

Compatibility with Symfony FormTypes

I'm not really sure it's a problem with the bundle or a user problem. I'm using the bundle to build some forms for the backend.
All fine ... until I tried to use the DateType from the Symfony Forms component. If I add the following to the config 'widget' => ['class' => 'clr w50'], I get this error:

An error has occurred resolving the options of the form "Symfony\Component\Form\Extension\Core\Type\DateType": The option "widget" with value array is invalid. Accepted values are: "single_text", "text", "choice".

If I add the textvalue to the widget I get the following error:

Warning: Illegal string offset 'class'

For me it seems that there is a conflict between the symfony form component and this bundle in the way how the configuration is done. I played a bit with the code and I think in this function https://github.com/netzmacht/contao-form-bundle/blob/master/src/Form/Extension/WidgetClassExtension.php#L55 the option should be renamed to something like contaoConfig.
What do you think, am I wrong or is this a bug? :-) If it is a bug, I can provide a Pull-Request for the changes. The Pull-Request will then contain BC breaks.

Feature: add support for selectors (type selector, sub palette selector, submitOnChange), palettes and callbacks

Hi there,

we already added an issue for DCA mapping. In the mean time, you coded something. In the future we might use this bundle as a base for a new dca form bundle for the frontend.

But the agenda we need to build is quite large and complex. Our legacy module https://github.com/heimrichhannot/contao-formhybrid does this, but it's quite old and uses legacy technologies and modules. In the next years we need to create a new bundle and your bundle seems to be a good starting point.

So the question is, whether you can imagine integrating the following features in this bundle:

  1. Support for all kinds of palette selectors (palette and sub palette)
  2. Support for submitOnChange (sync and async)
  3. Support for toggleSubpalette (sync and async)
  4. Support for callbacks (onload, load, save, onsubmit)

The lack of these functionalities in contao's form generator in the frontend was the reason we built formhybrid in the first place.

Or would that be out of your scope and we should build another bundle on top of yours? What do you think?

Thanks in advance for your thoughts.

Bye Defcon0
PS: Please keep in mind that this is a consideration rather for the next years but months ;-)

Compatibility with Contao 4.13

[] The Twig dependency needs to be updated to ^3.0 (Contao 4.13 requires ^3.0).
[] adamquaile/symfony-fieldset-bundle is not compatible with Symfony 5 (Contao 4.13 requires ^5.4) and seems not very active anymore. Should we implement a Fieldset Type ourselves?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.