Good morning & happy monday fellow Sprykers. ...
# help
a
Good morning & happy monday fellow Sprykers. A question debugging Symfony Forms within spryker (particularly a form in the checkout process): I am trying to find information in the WebProfiler, but nothing regarding forms seems available, even if in the FormDependencyProvider.php I have the WebProfilerFormPlugin being loaded. (I'd expect the clipboard icon in the toolbar, from my recalling of other symfony projects).
p
Heyhey, I am not using the webprofiler so I can not help directly - But maybe I can help with other approaches 🙂 What exactly do you wanna debug and why is xdebug not suitable for this?
🙏 1
a
I am trying to style a form field very particularly (attaching to js, etc. it's a stripe integration). I wanted to have control over the theming of the field, and usually I get one of the 'expected' block names from the form profiler.
p
Is the inspector of the browser not sufficient for this? block-name = form-name? or what block name you wanna get? from twig?
a
I was trying to find this via twig, but I think I will only see the names of currently used twig templates. If my understanding of symfony forms is correct, symfony will load the default 'block' per each row, unless you provide a specific named one I was trying to get that from the profiler. Here's an example in symfonycasts:
p
Hey, I played a bit around and made the profiler work for forms as well 🙂 The Problem is that it uses a so called “FormDataCollector”. And for forms it collects data via events. Problem: the one added for the events and used for data collection is a different instance than the one used for showing the data.
🙌 1
a
oh, whoa, nice! I will try in my environment
p
Yeah, normally I do not have so much time to look into these topics but I was curious why it is not working 😄
a
Much appreciated!
p
Tell me if it works for you once you had time to test it 🙂
a
working perfect, thanks! I got what I wanted 🙂
🙌 1
👌 1