Skip to content

Instantly share code, notes, and snippets.

@SantoshSrinivas79
Created August 1, 2012 04:45
Show Gist options
  • Save SantoshSrinivas79/3223741 to your computer and use it in GitHub Desktop.
Save SantoshSrinivas79/3223741 to your computer and use it in GitHub Desktop.
Sample for creating a new form using PyroStreams in PyroCMS
{{ streams:form stream="customer_interests" mode="new" return={ pages:url id="9" }​ }}
{{ form_open}}
<table>
{{ fields }}
<tr class="{{ odd_even }}">
<td width="50%">{{ input_title }}{{ required }} <br/><small>{{ instructions }}</small></td>
<td>{{ input }}<br/>{{ error }}</td>
</tr>
{{ /fields }}
</table>
{{ form_submit }}
{{ form_close }}
{{ /streams:form }}
{{ streams:cycle stream="customer_interests" limit="5" }}
<p>{{ total }} entries returned.</p>
{{ entries }}
<table>
<tr>
<td width="50%"><b>Name</b></td>
<td width="50%">{{ customer_name }}</td>
</tr>
<tr class="{{ odd_even }}">
<td width="50%"><b>Description</b></td>
<td width="50%">{{ property_description }}</td>
</tr>
<tr class="{{ odd_even }}">
<td width="50%"><b>Minimum Budget</b></td>
<td width="50%">{{ min_budget }}</td>
</tr>
<tr class="{{ odd_even }}">
<td width="50%"><b>Maximum Budget</b></td>
<td width="50%">{{ max_budget }}</td>
</tr>
</table>
{{ /entries }}
{{ pagination }}
{{ /streams:cycle }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment