netzmacht / contao-form-bundle Goto Github PK
View Code? Open in Web Editor NEWThis bundle enables the power of Symfony forms in your Contao project.
This bundle enables the power of Symfony forms in your Contao project.
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?
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:
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
Hi David,
würde aus deiner Sicht etwas dagegen sprechen den Symfony-Validator in Version ^5.0 als dependency mit aufzunehmen: https://github.com/netzmacht/contao-form-bundle/blob/master/composer.json#L33?
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 text
value 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.
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:
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 ;-)
[] 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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.