Getting Checkboxes to work on Frontend Forms I have tried to follow the instructions listed here for checkboxes on frontend forms but have not been successful in implementation.

First, here is my code:

&lt;form method="post" action="" accept-charset="UTF-8" enctype="multipart/form-data"&gt;
&lt;div class="form-group"&gt;
&lt;h3&gt;Push to GistServers for Gist {{ entry.id }}&lt;/h3&gt;
&lt;input type="hidden" name="action" value="gistClient/pushGistUnits"&gt;
&lt;input type="hidden" name="entryId" value="{{ entry.id }}"&gt;
&lt;p&gt;Select Gist Categories for Distribution.&lt;/p&gt;
{% if entry.gistCategories | length == 0 %}
    &lt;ul&gt;
        {% for option in entry.gistCategories.options %}
        &lt;input type="checkbox" value="{{ option.value }}" name="fields[gistCategories][]"&gt; {{ option.label }}&lt;br&gt;
        {% endfor %}
    &lt;/ul&gt;
{% else %}    
    &lt;ul&gt;
    {% for checkboxOption in entry.gistCategories %}
        {% set checked = false %}

        {% if checkboxOption.selected %}
            {% set checked = true %}

        {% endif %}

        {% if not checked %}
            &lt;input type="checkbox" value="{{ checkboxOption.value }}" name="fields[gistCategories][]" {% if checked %} checked="checked"{% endif %}&gt;{{ checkboxOption.label }}&lt;br&gt;
        {% endif %}

        &lt;input type="checkbox" value="{{ checkboxOption.value }}" name="fields[gistCategories][]" {% if checked %} checked="checked"{% endif %}&gt;{{ checkboxOption.label }}&lt;br&gt;
    {% endfor %}
    &lt;/ul&gt;
{%endif%}

{{ getCsrfInput() }}
{% if entry.socialPush == true %}
    {% set socialPush = "Push to GistServers"%}
    {% set socialPushBtn = "default"%}
{% else %}
    {% set socialPush = "Push to GistServers"%}
    {% set socialPushBtn = "success"%}
{% endif %}

&lt;button class="btn btn-{{socialPushBtn}}  btn-sm btn " style="margin:10px 15px 0 0;" type="submit" name="fields[gistDraft]" value="0"&gt;{{ socialPush }}&lt;/button&gt;
&lt;/div&gt; 




Now for screen caps showing behavior. 

Before form submit



CP View after form submit



Frontend form after submit.



Ideally, After I submit the frontend form my users would be able to see all checkboxes again in case they need to change the selections. I am at a loss and would appreciate some rescue here.
The first loop you're using loops over entry.gistCategories.options, which contains all the options available. However, in the second loop (when entry.gistCategories|length !== 0), you're only looping over the options that have been selected.

Try this:

{% if entry.gistCategories | length == 0 %}
    &lt;ul&gt;
        {% for option in entry.gistCategories.options %}
            {# output checkboxes #}
        {% endfor %}
    &lt;/ul&gt;
{% else %}  
    &lt;ul&gt;
        {% for checkboxOption in entry.gistCategories.options %}
            {# output checkboxes #}
        {% endfor %}
    &lt;/ul&gt;
{% endif %}