<p>I think so, if they are required fields. You'd just add them as hidden fields and there wouldn't be any additional database queries because it's already fetched the entry anyway.</p>

CC BY-SA 3.0
2017-06-09T06:53:19.180Z
2017-06-09T06:53:19.180Z
Clive Portman
<p>I have created a page where user creates an entry but its <strong>status</strong> is <strong>disabled</strong>. This page then redirects to a page where the user gets to see a preview of his entry. On this preview page there are two publish button when clicked the status of the entry has to be <strong>enabled</strong>. The code I have used is:</p>

<pre class="lang-html prettyprint-override"><code>&lt;form method="post" accept-charset="UTF-8"&gt;
    {{ getCsrfInput() }}
    &lt;input type="hidden" name="action" value="entries/saveEntry"&gt;
    &lt;input type="hidden" name="redirect" value="/user/thanks/{{slug}}"&gt;
    &lt;input type="hidden" name="sectionId" value="4"&gt;
    &lt;input type="hidden" name="entryId" value="{{entry.id}}"&gt;
    &lt;input type="hidden" name="enabled" value="1"&gt;
    &lt;button type="submit" class="btn-save"&gt;Publish&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>But after submitting the form it reloads the same page. I checked the craft.log, it has the following errors:</p>

<pre><code>2017/06/08 13:17:53 [warning] [application] Craft\ContentModel-&gt;dailyPlan failed validation: Daily Plans cannot be blank. ( a matrix field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel-&gt;banner failed validation: Banner cannot be blank. ( an asset field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel-&gt;Included failed validation: Included cannot be blank. ( a table field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel-&gt;Excluded failed validation: Excluded cannot be blank. ( a table field )
</code></pre>

<p>Can't I change the status of entry simply with the above form? Do I have to load all the required fields with its value? Well I don't want to do that as it would take lot of extra lines of code and also the execution time will be longer, as there are two publish button on the page.</p>

<entry><craft-pro>
How to change the Entry status to enabled from Disabled
# How to change the Entry status to enabled from Disabled

(Asked by: username_0 on 2017-06-09)

I have created a page where user creates an entry but its status is disabled. This page then redirects to a page where the user gets to see a preview of his entry. On this preview page there are two publish button when clicked the status of the entry has to be enabled. The code I have used is:

    {{ getCsrfInput() }}
    
    
    
    
    
    Publish


But after submitting the form it reloads the same page. I checked the craft.log, it has the following errors:
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel->dailyPlan failed validation: Daily Plans cannot be blank. ( a matrix field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel->banner failed validation: Banner cannot be blank. ( an asset field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel->Included failed validation: Included cannot be blank. ( a table field )
2017/06/08 13:17:53 [warning] [application] Craft\ContentModel->Excluded failed validation: Excluded cannot be blank. ( a table field )

Can't I change the status of entry simply with the above form? Do I have to load all the required fields with its value? Well I don't want to do that as it would take lot of extra lines of code and also the execution time will be longer, as there are two publish button on the page.

**Tags:** entry, craft-pro

---

## 1 answers

### Answer by username_1 on 2017-06-09. Score: 1

I think so, if they are required fields. You'd just add them as hidden fields and there wouldn't be any additional database queries because it's already fetched the entry anyway.


---

