Search code examples
formsexpressionenginemembersafecracker

Expression Engine Preventing additional entries by a single member


I have a safe cracker form that allows a logged in member to submit an entry (a vote, actually). When they submit their vote, I want to prevent them from ever being able to submit an entry to this channel again. Is that possible? If so, how? Something automatic that either sets a member variable or searches some field to see if a member has submitted or something.


Solution

  • Couldn't you just wrap something like this

    {exp:channel:entries channel='votes' author_id='{logged_in_member_id}' dynamic='off'}
      {if total_results == 0}
        {!-- allow a new entry --}
      {/if}
    {/exp:channel:entries}
    

    around some or all of you voting form?