Skip to content

Commit

Permalink
Update FormerlyVariable.php
Browse files Browse the repository at this point in the history
Making displaying the submissions work. (Issue enigmadigital#16 and enigmadigital#46)

Example twig tags:
{# get latest submission values #}
{% set submissions = craft.formerly.submissions.get() %}
{% set submission = submissions.contactForm_email(':notempty:')[0] %}
  • Loading branch information
Diederik Van Hoorebeke authored Dec 5, 2016
1 parent 5f73742 commit 5f81db0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions variables/FormerlyVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public function form($handle)
return craft()->formerly_forms->getFormByHandle($handle);
}

public function submissions()
{
return craft()->elements->getCriteria('Formerly_Submission');
}

public function __get($prop)
{
if ($prop == 'submissions')
Expand Down

0 comments on commit 5f81db0

Please sign in to comment.