TransWikia.com

Creating an entry with a hidden title from a frontend form is failing

Craft CMS Asked by Brimby on April 18, 2021

I have the Title Format set to {id} and that works fine if I create an entry manually from the CP. But I’m trying to create the entry from a frontend form, and it’s erroring on me whether I try to send a title along or not. I know that it’s the aspect of the hidden title that is causing the error, because if I allow the section to have a normal (non-hidden) title and add a title field to my form, it succeeds in creating an entry.

        <form method="post" accept-charset="UTF-8">
          {{ csrfInput() }}
          {{ actionInput('entries/save-entry') }}
          {{ redirectInput('/dashboard') }}
          {{ hiddenInput('sectionId', 4) }}
          {{ hiddenInput('enabled', '1') }}
          <input type="submit" value="Next">
        </form>

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP