Freeform no results
Posted: 14 August 2007 08:42 AM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  36
Joined  2006-11-03

Hi,

I’m loving Freeform.  It’s a great module.  I wondered if there is anyway to display in the form tag if there are no results or if the form hasn’t been submitted.

Like {if no_results} message {/if}

Thanks

Profile
 
 
Posted: 14 August 2007 09:30 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

You should be able to use the exp:freeform:entries tag for what you describe.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 14 August 2007 09:34 AM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  36
Joined  2006-11-03

I have tried the {if no_results} and that doesn’t work.  Is there another conditional I can use.  I don’t see one listed in your docs.

thanks

Profile
 
 
Posted: 14 August 2007 09:37 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

If you’re using exp:freeform:entries and the tag is in a template wrapped inside some other EE tags, the other tags can parse out the conditional before Freeform gets a chance to. Is this happening?

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 14 August 2007 09:42 AM   [ Ignore ]   [ # 4 ]
Jr. Member
RankRank
Total Posts:  36
Joined  2006-11-03

No the freeform:entries tag is not inside any other ee tags.  This is the template:

{embed="ssi/.header"}

<h1>The Following People will be attending {segment_3}</a></h1>

<table width="300" class="form" summary="rsvp info">
<tr>
<th>Name</th><th align="center">Number in Party</th>
</tr>

{exp:freeform:entries form_name="{segment_3}" orderby="name" sort="asc"}

<tr><td>{name}</td> <td align="center">{partysize}</td></tr>

{/exp:freeform:entries}

</table>

« Back to the Event

{embed="ssi/.footer"}

Profile
 
 
Posted: 14 August 2007 09:45 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Where’s the {if no_results} tag?

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 14 August 2007 09:50 AM   [ Ignore ]   [ # 6 ]
Jr. Member
RankRank
Total Posts:  36
Joined  2006-11-03

Sorry, it’s not in that example but I just put {if no_results} message {/if} inside the freeform:entries tag. That should work, huh?

Profile
 
 
Posted: 14 August 2007 10:16 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

I am expecting it to work, but can’t explain why in your case it is not.

mk

 Signature 

Mitchell Kimbrough

Profile