0

I have a repeatable field in my custom module, and a textarea field inside it.

<field name="repeatable_field"
    type="Repeatable"
    icon="list"
    label="My Repeatable field">
    <fieldset hidden="true" name="repeatable_field_modal" repeat="true">
        <field name="text_area"
            label="Text"
            size="30"
            type="textarea"
            filter="raw" />
    </fieldset>
</field>

Even if I add filter="raw" to the field declaration, any HTML code removed from my textarea field.

How can I apply a filter to fields inside a Repeatable element?

3

In order to apply a filter to a field inside a Repeatable field, the filter has to be applied to the repeatable element itself, not to fields inside.

This works:

<field name="repeatable_field"
    type="Repeatable"
    icon="list"
    label="My Repeatable field"
    filter="raw">
    <fieldset hidden="true" name="repeatable_field_modal" repeat="true">
        <field name="text_area"
            label="Text"
            size="30"
            type="textarea" />
    </fieldset>
</field>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.