Blog Sections Open

Using Array-Style Input Names with eForm

Array-style field names can be useful when one form collects several repeated values, but they also make validation and mail processing less obvious. That was the heart of the original eForm question here. Example Markup

Array-style field names can be useful when one form collects several repeated values, but they also make validation and mail processing less obvious. That was the heart of the original eForm question here.

Example Markup

<input name="fio[0]" eform=":string:0">
<input name="name[0]" eform=":string:0">

Main Issue

eForm was designed primarily for flat field names. Once array-like fields are introduced, you need to verify carefully how validation, placeholder output, and mail templates will consume that data.

Practical Advice

  • keep repeated fields structured consistently
  • test what reaches PHP in $_POST
  • normalize the data before rendering it into a mail template

If the form becomes complex enough, a custom processing layer is often cleaner than trying to keep everything inside a simple eForm configuration string.

Newer post

Using TinyMCE Inside a Textarea TV Safely

How to approach textarea TVs enhanced with TinyMCE without making the editor experience fragile or inconsistent.

Older post

When Too Many TVs Become a Content Modeling Problem

How to recognize the point where a project has outgrown ad-hoc TVs and needs a more deliberate content model.