---
name: "HTML::FormFu::Filter::ForceListValue"
section: "3pm"
platform: "linux"
package: "libhtml-formfu-perl"
version: "2.07000-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/HTML::FormFu::Filter::ForceListValue"
---

# HTML::FormFu::Filter::ForceListValue(3pm)

convert a single value into a 1-item-list

## NAME

HTML::FormFu::Filter::ForceListValue - convert a single value into a 1-item-list

## VERSION

version 2.07

## SYNOPSIS

```
    element:
      - type: Repeatable
        increment_field_names: 0
        elements:
          - name: foo
            render_processed_value: 1
            filter:
              - ForceListValue
```

## DESCRIPTION

Causes a single submitted value to be changed to a list containing 1 item.

Solves an uncommon problem with a Repeatable block with increment\_field\_names disabled, when manually increasing the repeat count after the form was submitted with only a single value for each of the Repeatable's fields.

If these circumstances, when rendered, every repeated field would have the initially-submitted value as its default.

Using this filter, and setting render\_processed\_value to `"true"` will ensure that only the first repetition of each field will have the submitted value as its default; all subsequent repetitions will have no default value.

## AUTHOR

Carl Franks

## LICENSE

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

## AUTHOR

Carl Franks \<cpan@fireartist.com\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Carl Franks.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
