I am currently experiencing an issue with the Post data not submitting for a front end entry form that I am creating.
Here's my code:
{% macro errorList(errors) %}
{% if errors %}
{{ ul(errors, {class: 'errors'}) }}
{% endif %}
{% endmacro %}
{# If there were any validation errors, an `entry` variable will be
passed to the template, which contains the posted values
and validation errors. If that’s not set, we’ll default
to a new entry. #}
{% set entry = entry ?? create('craft\\elements\\entry') %}
<form method="post" accept-charset="UTF-8" enctype="multipart/form-data">
{{ csrfInput() }}
{{ actionInput('entries/save-entry') }}
<input type="hidden" name="redirect" value="{{ '{site.url}'|hash }}">
{{ hiddenInput('sectionId', '2') }}
{{ hiddenInput('enabled', '1') }}
<input type="hidden" name="entryId" value="{{ entry.id }}">
<div class="row g-3">
<div class="col-md-6 pb-3">
<label for="title" class="text-bloogy">Title</label>
{{ input('text', 'title', entry.title, {
id: 'title',
}) }}
{{ _self.errorList(entry.getErrors('title')) }}
</div>
</div>
<button type="submit" class="btn btn-success btn-lg w-50 mb-3">Save Blog Entry</button>
</form>
Once submitted it shows that the submit worked but that no Post data was actually sent. This is what the logs show for the Post data.
$_POST = []