at first I would like to say hello to all the users of this page, I've been using it for some time while looking for help in web developement, but it's time to ask a question.
I have to modify two lists on a silverstripe template to look similar to each other - here's the one that is the "source":
<% if not $IsThanks %>
<% if $IsSequentialSearch %>
<section class="panel vacancy columns jobalertform" style="background: #fff;">
<h1 class="searchfilter"><%t Site.JobAlert 'Job Alert' %></h1>
<% include JobAlertForm %>
</section>
<% else_if $IsSearch %>
<section id="JobAlertFormModal" class="reveal-modal medium row" style="background: #fff;top:200px!important" data-reveal aria-hidden="true" role="dialog">
<h1 class="searchfilter"><%t Site.JobAlert 'Job Alert' %></h1>
<% include JobAlertForm %>
<a class="close-reveal-modal" aria-label="Close">×</a>
</section>
<% end_if %>
<% end_if %>
and here's the one that I have to modify to look similar to the previous one:
<ul>
<% loop $Jobs %>
<% if $IsInternal %>
<section class="panel vacancy columns jobalertform" style="background: #fff;">
<a href="$SireJobPage.Link('viewvacancy')/$Link/?m=$ConsultantID" target="_blank" title="$Title"><h1 class="searchfilter">
<% include JobAlertForm %>
</h1></a>
</section>
<% else %>
<section class="panel vacancy columns jobalertform" style="background: #fff;">
<a href="$JobAdPage.Link('viewvacancy')/$Link/?m=$ConsultantID" target="_blank" title="$Title"><h1 class="searchfilter">
<% include JobAlertForm %>
</h1></a>
</section>
<% end_if %>
<% end_loop %>
</ul>
The first one is responsible for job search results, and the second one is a list of jobs related to specific recruiter. When I'm pasting <% include JobAlertForm %>
I'm getting error [Warning] Missing argument 1 for ViewableData::getField(), called in /var/www/sites/sire-search.com/htdocs/framework/view/ViewableData.php on line 108 and defined
. Where's my mistake?
JobAlertForm.ss
<% with $JobAlertForm %>
<% if $IncludeFormTag %>
<form $AttributesHTML data-abide>
<% end_if %>
<% if $Message %>
<div id="{$FormName}_error" class="alert-box<% if $MessageType == "bad" %> alert<% end_if %>">$Message<a href="" class="close">×</a></div>
<% else %>
<div id="{$FormName}_error" class="alert-box secondary" style="display: none;"></div>
<% end_if %>
<div class="row">
<div class="columns small-12 medium-8">
<% loop $Fields %>
$FieldHolder
<% end_loop %>
</div>
<div class="columns small-12 medium-4">
<% loop $Actions %>
$Field
<% end_loop %>
<p>
<%t Site.IfContinueAgreeWithOur 'If you continue, you are agreeing with our' %>
<a id="TOSLink" href="$Top.PrivacyPolicyPage.Link" target="_blank"><%t Site.TermsAndConditions 'Terms & Conditions' %></a>
.</p>
</div>
</div>
<% if $IncludeFormTag %>
</form>
<% end_if %>
<% end_with %>