34 questions
0
votes
2
answers
57
views
Symfony UX LiveComponent with collection
I'm using a LiveComponent to access a form with a OneToMany collection.
Adding an item works perfectly, but when I delete an item, the entire collection is deleted.
The code is below.
->add('...
2
votes
1
answer
104
views
Show several markers on a map with Symfony UX Map
I would like to have multiple markers on the same map with Symfony and UX Map!
I've read the documentation but can't find the solution there!
At the moment, I can get all the markers but on different ...
0
votes
0
answers
81
views
Symfony UX LiveComponent file upload works only on first request
I’m having trouble with file uploads in Symfony UX LiveComponent.
I’m using Symfony 7.2, Symfony UX 2.x, and PHP 8.2.
The problem
I have a LiveComponent form that includes a file upload field.
On the ...
0
votes
1
answer
40
views
Symfony UX Live Components: "Expected string, null given"
I'm using Symfony UX Live Components to edit an NtExam. I get this error when editing the form:
Expected argument of type "string", "null" given at property path
"exam_title&...
0
votes
1
answer
87
views
How to upload file in Symfony LiveComponent with other form data?
So, as per the docs, this is how we upload a file in Symfony Live components.
If we have to upload a file along with other input, how to do it?
Code from docs:
<p>
<input type="file&...
0
votes
0
answers
196
views
How to refresh a Live component manually?
I'm working with Symfony Live Components and noticed an issue when switching between child components.
My parent template looks like this:
{% if step == 1 %}
<twig:ChildComponent1 />
{% ...
0
votes
0
answers
204
views
Why when using Symfony UX and Forms I get INVALID CSRF TOKEN?
I have a question regarding Symfony UX Live Components and forms.
Context:
Imagine you have a Parent Component and a nested Child Component. Both are Live Components and both include Symfony FORMS (...
3
votes
2
answers
392
views
LiveComponent isn't updating the LiveProp value
I am trying to use the Symfony UX LiveComponent, firstly I tried to use the first exemple of the documentation:
// ArticleSearch.php
<?php
namespace App\Twig\Components;
use App\Repository\...
-1
votes
1
answer
130
views
How to resolve tailwind conflicts with twig components default classes
I'm working on a Symfony 7 project with symfony/ux-twig-component v2.22.1 and tales-from-a-dev/twig-tailwind-extra v0.2.1 packages. I sometime have to override some default tailwind classes in my ...
-1
votes
1
answer
75
views
Auto trigger function prerender Symfony LiveComponent
I have a LiveComponent with an array of prices, depending on if a checkbox is checked or not the prices should be with VAT in- or excluded.
This works nicely. The problem is:
When I check the box -&...
0
votes
1
answer
178
views
Symfony UX - LiveComponent problem with html5 date
I implemented LiveComponent on my form containing a date and other fields.
I use a DateType field compatible with html5. When I use my form and type a date that starts with 0 (eg: 05/10/2024), I have ...
0
votes
1
answer
899
views
Symfony-ux-live-component No matching "form" property or mount() argument was found
class PostForm extends AbstractController
{
use DefaultActionTrait;
use ComponentWithFormTrait;
/**
* The initial data used to create the form.
*/
#[LiveProp]
public ?...
1
vote
0
answers
276
views
Add a form field dynamically with Symfony UX
I want to add a dynamic field in a form. However, when clicking on the concerned field, nothing happens. Indeed, when clicking on the "Can publish a podcast" field, another field should ...
0
votes
1
answer
120
views
External scripts not loaded in symfony 7 with symfony ux
I am currently using symfony with many packages of symfony ux, and my external scripts (such as font awesome or google fonts) are not loaded, i receive this error message : Content-Security-Policy : ...
2
votes
1
answer
1k
views
Remove all previous selected options in Tom Select configured with external data
I have two Tom Select (select inputs) configured through Symfony UX Autocomplete and Stimulus :
First holds the main category ("Batterie démarrage moto" in the example).
Second one is ...
0
votes
0
answers
300
views
Symfony UX and Dropzone : How to download files
I would like to use Symfony UX and the Dropzone component in my project to allow image downloading.
Everything seems to work fine. However, I can't get the files in my controller to process and upload ...
0
votes
1
answer
1k
views
Live Component Updating a parent model from a collection child
I'm implementing a LiveComponent that contains a collection of child components. Everything works mostly fine, but I don't see how can I update a parent model if the updated property is an array.
Is ...
1
vote
1
answer
123
views
Symfony 6, form textarea not posted after submiting the form
I have simple contact form:
<form id='contactform' action="{{ path('app_contact_send') }}" method="POST" name="contactform">
<ul class="form-cover"&...
1
vote
2
answers
2k
views
Symfony UX - TomSelect Autocomplete custom js controller problem
I'm struggling with configuration of Symfony UX Autocomplete component extension -
My goal is to modify TomSelelct Instance - the way how its rendered and add options like https://tom-select.js.org/...
0
votes
1
answer
823
views
symfony ux-live
please can someone help me with ux-live-component
even tho i executed the commands :
composer require symfony/ux-twig-component
composer require symfony/ux-live-component
composer require symfony/...
3
votes
3
answers
4k
views
Symfony ux-react: React component does not render when using react_component()
I've initialized a new Symfony project with version 6.3.3 and wanted to try out the symfony-ux stuff with React. So I followed this guide: https://symfony.com/bundles/ux-react/current/index.html
But I ...
0
votes
1
answer
547
views
Symfony UX Autocomplete - choice_label with KnpLabs Translatable
Autocomplete choice labels don't translate
Platform is Symfony 6.3, with UX Autocomplete 2.9
My issue
My issue: I have a Symfony UX Autocomplete form field, the choice_labels are stored in translated ...
6
votes
4
answers
2k
views
Symfony UX Chart.js just display a blank square
I have followed the official tutorial to get my chart on symfony : https://symfony.com/bundles/ux-chartjs/current/index.html
But the chart does not display, it is just blank. I head that it may be ...
0
votes
1
answer
1k
views
ClassNotFoundError in Symfomy 6 project
I have this error on my Symfony 6.0 project:
Attempted to load class "TwigComponentBundle" from namespace "Symfony\UX\TwigComponent".
Did you forget a "use" statement for ...
3
votes
1
answer
1k
views
Symfony UX Swup, Unknown "stimulus_controller" function
I'm using symfony 6.3 and I have installed symfony/ux-swup:
//bundles.php
<?php
return [
// ..............
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
...
2
votes
0
answers
1k
views
Symfony UX - How to mix 2 Live Components?
I'm playing with Symfony UX, Twig Component and Live Component.
On the one hand, I set up the present example here : https://ux.symfony.com/live-component, it works well.
On another side, I have ...
0
votes
4
answers
1k
views
Add remove button on custom template Tom-Select
I have some problems with the Tom-Select template. When I use the default template, I can delete an item with the Delete button. But when I defined my own, I can't delete anything.
I have my tomSelect ...
1
vote
0
answers
257
views
How add adapters to symfony/ux-chartjs?
Is there any possible options to use date adapters for time labels? I have exact same problem as this question, but it looks abandoned already.
In Symfony UX Chart.js doc only about using plugins. But ...
2
votes
1
answer
582
views
How to add DateTime adapter to symfony/ux-chartjs?
I am trying to setup ChartJS with Symfony UX. Since a default datetime adapter is not included with ChartJS 3+, I am getting the following error when using time unit in an axis.
This method is not ...
0
votes
2
answers
468
views
Reinitialize autocomplete after form submission
I have a custom autocomplete input that is not bound to any entities:
$builder
->add('input', TextType::class, [
'autocomplete' => true,
'autocomplete_url' => 'https://...
3
votes
2
answers
1k
views
Symfony UX chart does not show chart in easyadmin
I have a problem with displaying a chart in easyadmin. It does show up in the HTML as shown below.
<canvas data-controller="symfony--ux-chartjs--chart" data-symfony--ux-chartjs--chart-...
1
vote
2
answers
4k
views
Why is Symfony UX-Autocomplete not working here?
My form works but auto-complete does not.
Anyone has an idea of what could be wrong?
Thanks and sorry for my english!
I tried adding "autocomplete" attribute:
<?php
namespace App\Form;
...
3
votes
0
answers
1k
views
Symfony-UX / Stimulus - Error connecting controller
I wandet to try the Symfony Cropper UX-Component, but it resulted in an Javascript-Error:
Error connecting controller
TypeError: expected value of type "object" but instead got value "[]...
0
votes
2
answers
928
views
symfony easyadmin dropzone field
is there a way in symfony easyadmin I can configureFields of type symfony ux Dropzone ??
I used this method but when I drag drop, the preview image does not show ,any help
yield Field::new('imageFile')...