2

I have a safecracker form I just converted to channel:form and I just changed it so when an entry is created it's automatically set to status="closed"

What I'm trying to do is display a message if the created entry is still being moderated (status is closed), display a message if there is NO entry created, or display a msg if there IS an entry created.. How do I tell the difference?

{exp:channel:entries
channel="personal_trainer_directory"
limit="1"
dynamic="no"
author_id="CURRENT_USER"
status="closed"
}
    ***DISPLAY IF STATUS IS CLOSED***
{/exp:channel:entries}

{exp:channel:entries
channel="personal_trainer_directory"
limit="1"
dynamic="no"
author_id="CURRENT_USER"
}
    {if  no_results}
    ***DISPLAY IF NO RESULTS***
    {/if}
    ***DISPLAY IF THERE IS A RESULT***
{/exp:channel:entries}
5
    {exp:channel:entries
channel="personal_trainer_directory"
limit="1"
dynamic="no"
author_id="CURRENT_USER"
status="open|closed"
}
    {if  no_results}
    ***DISPLAY IF NO RESULTS***
    {/if}

{if status=="closed"}
    ***DISPLAY IF STATUS IS CLOSED***
{if:else}
    ***DISPLAY IF THERE IS A RESULT***

{/if}
{/exp:channel:entries}

Is that what you mean?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.