I'm working on a front-end entry form with custom text input fields. From the Entry Form knowledgebase docs, I read "Any custom field handles must be provided in a fields[] array like body is above." On that page their example 'body' field is a textarea field, and when I use this with my own textarea fields it works fine. However I'm having trouble formatting that same logic to make a simple plaintext input field work properly.
My current (non-working) code is:
<label for="contactName">Contact Name</label>
{{ input('text', 'contactName', entry.contactName, {
id: 'contactName',
name: 'fields[contactName]'
}) }}
No errors are being thrown when I submit the form, but the values from the plaintext input area are not being saved. What's the proper way to format such that the input values are saved properly?