Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.
You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page
The MoneyWithSuffixType
represents input with currency suffix.
Option | Type | Default | Description |
---|---|---|---|
currency | string | EUR |
Currency ISO code |
suffix | string | Empty string | Suffix text |
None.
Add MoneyWithSuffixType
to your form.
<?php
use Symfony\Component\Form\AbstractType;
use PrestaShopBundle\Form\Admin\Type\MoneyWithSuffixType;
class SomeType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('price', MoneyWithSuffixType::class, [
'currency' => 'EUR',
'suffix' => '(tax excl.)',
])
;
}
}