Sylius version affected: 1.4 at least
Description
Symfony 4.1 feature described here https://symfony.com/blog/new-in-symfony-4-1-form-field-help not working at Sylius with even Symfony 4.3
# src/Form/Type/SomeFormType.php
public function buildForm(FormBuilderInterface $builder, array $options): void
{
// ...
->add('payment_methods', TextType::class, [
'help' => 'https://learn.quickpay.net/tech-talk/appendixes/payment-methods/#payment-methods',
])
}
Renders form without help:
<div class="required field"><label for="sylius_payment_method_gatewayConfig_config_payment_methods" class="required">Payment methods</label><input type="text" id="sylius_payment_method_gatewayConfig_config_payment_methods" name="sylius_payment_method[gatewayConfig][config][payment_methods]" required="required" value="creditcard, paypal, !viabill"></div>
Screenshot: https://www.dropbox.com/s/wdpv4g6atpe62n5/Screenshot%202019-06-24%2019.19.05.png?dl=0
Steps to reproduce
help parameter to any form field.Possible Solution
Not sure, maybe fix form template
https://jsfiddle.net/vvasiloi/aLc6etzk/
Basically the help widget for any input consists of the following markup:
<i class="question circle outline link icon" data-help-popup="help-popup"></i>
<div class="ui popup" id="help-popup">
Find more at <a href="https://docs.sylius.com/">Sylius Docs</a>
</div>
and the initialization script:
$('[data-help-popup]').each(function() {
const $trigger = $(this);
$trigger.popup({
inline: true,
preserve: true,
hoverable: true,
popup: $trigger.attr('data-help-popup')
});
});
WDYT?
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.
I got the same issue, so i'll fix it ;)