dev-master
9999999-devCraft Plugin that allows users to build their own forms and view form submissions
The Requires
by XO Digital
Craft Plugin that allows users to build their own forms and view form submissions
formerly
directory into your craft/plugins
directoryUsers (both admin and client) can easily create forms in the Formerly admin section, under the Forms tab. A form consists of:, (*1)
A form can be rendered using, e,g., (*2)
{% set form = craft.formerly.form('handle') %} {% include 'form.html' with { form: form } %}
Where form.html
is Twig code that iterates through the form's questions,
creating form markup. An example form.html
is provided with the source code
for this plugin., (*3)
You can also obtain a form instance by having a content editor select a form using the Formerly field type, e.g., (*4)
{% include 'form.html' with { form: entry.form } %}
Form submissions are a Craft Element, which means that you can query them using
regular ElementCriteriaModel
s. For example, to list submissions to the
competition
form who have selected Australia as their country:, (*5)
{% set submissions = craft.formerly.submissions('competition') .country('Australia') .sort('dateCreated desc') %} {% for submission in submissions %} Name: {{ submission.formhandle_name }} Email: {{ submission.formhandle_email }} {# ... #} {% endfor %}
This function allows for subscribers to be directly subscribed to your mailchimp list., (*6)
ON
the Mailchimp toggle.Mailchimp Merge Tag
Each submission will then be added to the list in Mailchimp, (*7)
Craft Plugin that allows users to build their own forms and view form submissions