<section class="dashboard-page dashboard-page-form">
    <div class="container">
        <h1>Application Form.</h1>

        <div class="row rp0 scrollspy-container">
            <div class="col-sm-3 cp0 scrollspy-static">
                <div class="dashboard-form-sidemenu scrollspy-menu" id="ScrollSpyMenu">
                    <div class="sidemenu-title">Select a Step</div>
                    <ul class="list-unstyled">
                        <li>
                            <a class="smoothscroll-link scrollspy-link active" data-scrollspy-link="ScrollSpy1"
                               href="#ScrollSpy1">1. Contact details</a>
                        </li>
                        <li>
                            <a class="smoothscroll-link scrollspy-link" data-scrollspy-link="ScrollSpy2"
                               href="#ScrollSpy2">2.
                                Tell us about yourself</a>
                        </li>
                        <li>
                            <a class="smoothscroll-link scrollspy-link" data-scrollspy-link="ScrollSpy3"
                               href="#ScrollSpy3">3.
                                Show details</a>
                        </li>
                        <% with $ApplicationForm %>
                            <% loop $ApplicationLocations %>
                                <li>
                                    <a class="smoothscroll-link scrollspy-link"
                                       data-scrollspy-link="ScrollSpy{$Up.getLocationIndexPosition($Pos)}"
                                       href="#ScrollSpy{$Up.getLocationIndexPosition($Pos)}">{$Up.getLocationIndexPosition($Pos)}
                                        . {$Title} venue</a>
                                </li>
                            <% end_loop %>
                            <li>
                                <a class="smoothscroll-link scrollspy-link"
                                   data-scrollspy-link="ScrollSpy$getStepIndex(4)"
                                   href="#ScrollSpy{$getStepIndex(4)}">$getStepIndex(4). Other performances</a>
                            </li>
                            <li>
                                <a class="smoothscroll-link scrollspy-link"
                                   data-scrollspy-link="ScrollSpy$getStepIndex(5)"
                                   href="#ScrollSpy$getStepIndex(5)">$getStepIndex(5). Agreement</a>
                            </li>
                        <% end_with %>
                    </ul>

                    <div class="sidemenu-save-draft">
                        <input type="submit" name="action_doSave_trigger" value="Save a draft"
                               class="btn btn-yellow btn-block trigger-alias" id="action_doSave_trigger"
                               data-triggerid="ApplicationForm_ApplicationForm_action_doSubmit"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-9 cp0">
                <div class="dashboard-form-content">
                    <% with $ApplicationForm %>
                        <form $FormAttributes name="ApplicationForm" novalidate <%--data-parsley-validate--%>>
                            <% if $Message %>
                                $Message
                            <% end_if %>
                            <div id="ScrollSpyStart" class="scrollspy-start"></div>
                            <%-- 1. Contact Details --%>
                            <fieldset id="ScrollSpy1">
                                <div class="legend">
                                    1. Contact Details
                                    <div class="dashboard-form-tooltip">
                                        <div class="label">?</div>
                                        <div class="content">
                                            <p>If your contact details change, please notify the office on
                                                info@comedyfestival.co.nz.
                                                We recommend that you get help to produce your show so you can
                                                concentrate on what
                                                you do best: make the funnies.
                                                If you’re after a hook-up with a producer, publicist, director, please
                                                get in touch
                                                and we can point you in the direction of someone perfect for the job.
                                            </p>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-12">
                                        <% with $Fields.dataFieldByName('ActOrigins') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <%--<div class="form-group">--%>
                                            <label for="{$ID}">{$Title}</label>
                                            $Field
                                            <%--</div>--%>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('FirstName') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Surname') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Email') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('PhoneNumber') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Company') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Address') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Suburb') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('City') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group form-group-select">
                                                <label for="$ID">$Title</label>

                                                <div class="lg-select">
                                                    {$SVG('select-arrow').extraClass('svg-arrow').Width('11').Height('9')}
                                                    $Field
                                                </div>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Postcode') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Country') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Website') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <h3>Creative Team</h3>

                                <p>If any of these are not relevant to your show please leave blank.</p>
                                <p>If you're after a hook-up with a producer, publicist, or director, get in touch and we can help point you in the right direction.</p>

                                <% if $PerformerFields %>
                                    <% loop $PerformerFields %>
                                        <% if $First || $Modulus(2) == 1 %>
                                        <div class="row">
                                        <% end_if %>
                                        <% with $PerformerField %>
                                            <div class="col-sm-6">
                                                <div class="form-group RepeatableField">
                                                    <label for="{$ID}">{$Title}</label>
                                                    <input $AttributesHTML />
                                                </div>
                                            </div>
                                        <% end_with %>
                                        <% if $Last || $Modulus(2) == 0 %>
                                        </div>
                                        <% end_if %>
                                    <% end_loop %>
                                <% else %>
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <% with $Fields.dataFieldByName('Performers[0]') %>
                                                <div class="form-group RepeatableField">
                                                    <label for="{$ID}">Performer 1*</label>
                                                    <input $AttributesHTML />
                                                </div>
                                            <% end_with %>
                                        </div>
                                    </div>
                                <% end_if %>

                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Directors') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Writers') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Producer') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('Publicist') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-6">
                                        <% with $Fields.dataFieldByName('OtherTeam') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-12">
                                        <% with $Fields.dataFieldByName('CulturalIdentity') %>
                                            <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <textarea name="{$Name}" id="{$ID}" $AttributesHTML>$Value</textarea>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-12">
                                        <% with $Fields.dataFieldByName('GenderIdentity') %>
                                            <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <textarea name="{$Name}" id="{$ID}" $AttributesHTML>$Value</textarea>
                                            </div>
                                        <% end_with %>
                                    </div>
                                </div>

                            </fieldset>
                            <hr/>
                            <fieldset id="ScrollSpy2">
                                <div class="legend">
                                    2. Tell us about yourself
                                    <div class="dashboard-form-tooltip">
                                        <div class="label">?</div>
                                        <div class="content">
                                            <p>Please provide us with a brief CV. Give us an idea of how long you have
                                                been
                                                performing, where you have performed, any relevant highlights from your
                                                career.
                                                If you provide any website links please ensure they are active and up to
                                                date.
                                                If you would like to send through any supplementary information, contact
                                                the
                                                Festival office.</p>
                                        </div>
                                    </div>
                                </div>

                                <% with $Fields.dataFieldByName('YearsPerforming') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <label for="{$ID}">{$Title}</label>

                                    <div class="row">
                                        <div class="col-sm-6">
                                            <div class="form-group">
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        </div>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('PerformancesAwardsAndAchievements') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="form-group">
                                        <label for="{$ID}">{$Title}</label>
                                        <textarea name="{$Name}" id="{$ID}" class="form-control">$Value</textarea>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('PerformanceClipLink') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="form-group">
                                        <label for="{$ID}">{$Title}</label>
                                        <input $AttributesHTML class="form-control"/>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('FindOutMorePerformer') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="form-group">
                                        <label for="{$ID}">{$Title}</label>
                                        <% if $Type == 'textarea' %>
                                            <Textarea name="{$Name}" id="{$ID}" class="form-control">{$Value}</Textarea>
                                        <% else %>
                                            <input $AttributesHTML class="form-control"/>
                                        <% end_if %>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('FindOutMoreShow') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="form-group">
                                        <label for="{$ID}">{$Title}</label>
                                        <input $AttributesHTML class="form-control"/>
                                    </div>
                                <% end_with %>
                            </fieldset>
                            <hr/>
                            <fieldset id="ScrollSpy3">
                                <div class="legend">
                                    3. Show Details
                                    <div class="dashboard-form-tooltip">
                                        <div class="label">?</div>
                                        <div class="content">
                                            <p>Please give us as much information as you can on the show you’re
                                                submitting to our
                                                Festival. We want to know as much as possible about this show, including
                                                genre (be
                                                specific as you like), target audience, places it has been performed
                                                before. What is
                                                the show actually about? No need for marketing speak here. Tell us where
                                                the show
                                                came from, what it is about and why you want the NZ International Comedy
                                                Festival
                                                audiences to watch it next year. It is important we know as much about
                                                the technical
                                                side of the show as possible. Some venues have restrictions on what they
                                                can
                                                provide. If you are unsure, please let us know what technical equipment
                                                you think
                                                you may need, especially if there is the possibility of
                                                projection/AV.</p>
                                        </div>
                                    </div>
                                </div>

                                <p>Please give as much detail as possible - the more we know about your show the easier it is for us to programme.</p>

                                <% with $Fields.dataFieldByName('ShowTitle') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <input $AttributesHTML
                                                        class="form-control"/>
                                            </div>
                                        </div>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('ShowTypes') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <label class="form-group-checkbox-label">Show Type*</label>

                                    <div class="row">
                                        <% loop $Options %>
                                            <div class="col-sm-4">
                                                <div class="form-group form-group-checkbox">
                                                    <input type="checkbox" name="{$Name}" value="{$Value}" id="{$ID}"
                                                           class="form-control" <% if $isChecked %>
                                                           checked="checked"<% end_if %><% if $isDisabled %>
                                                           disabled="disabled"<% end_if %> />
                                                    <label for="{$ID}">{$Title}</label>
                                                </div>
                                            </div>
                                        <% end_loop %>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('ShowDuration') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <label for="{$ID}">{$Title}</label>

                                    <p class="form-note">Please note that the standard duration is 1 hour. Longer shows
                                        may not be
                                        available in certain venues or may incur increased venue rental changes.</p>

                                    <div class="row">
                                        <div class="col-sm-6">
                                            <div class="form-group form-group-select">
                                                <div class="lg-select">
                                                    {$SVG('select-arrow').extraClass('svg-arrow').Width('11').Height('9')}
                                                    $Field
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                <% end_with %>
                                <% with $Fields.dataFieldByName('ShowDurationOther') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <label for="{$ID}">{$Title}</label>

                                    <div class="row">
                                        <div class="col-sm-6">
                                            <div class="form-group">
                                                <input $AttributesHTML class="form-control"/>
                                            </div>
                                        </div>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('ShowSynopsis') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="form-group">
                                        <label for="{$ID}">{$Title}</label>

                                        <p class="form-note">In this section you should provide a synopsis of your show.
                                            If it's
                                            been staged before, tell us all about it. If you're still making the show,
                                            tell us what
                                            you plan to make. Please also discuss the target audience for your show, and
                                            your
                                            ability to create a quality performance.</p>
                                        <textarea name="{$Name}" id="{$ID}" $AttributesHTML>$Value</textarea>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('ShowKeyObjectives') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="form-group">
                                        <label for="{$ID}">{$Title}</label>

                                        <p class="form-note">For example: Build your audience, gain exposure to new
                                            audiences, build
                                            your profile, make some dollars, network, I've got a show to share, have a
                                            good time,
                                            etc.</p>
                                        <% if $Type == 'textarea' %>
                                            <Textarea name="{$Name}" id="{$ID}" $AttributesHTML>{$Value}</Textarea>
                                        <% else %>
                                            <input $AttributesHTML />
                                        <% end_if %>
                                    </div>
                                <% end_with %>

                                <% with $Fields.dataFieldByName('ShowTechnicalRequirements') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>

                                    <label for="DisplayTechnicalRequirements">$Title</label>

                                    <p class="form-note">Does your show have any technical or other practical
                                        requirements that may
                                        affect venue suitability? For example performance/stage requirements, lighting,
                                        sound or AV
                                        requirements, set requirements.</p>

                                    <div><input type="radio" name="DisplayTechnicalRequirements" value="Yes"
                                                style="left:0;position: inherit;"
                                                onclick="javascript:document.getElementById('show-technical-requirements').style.display = 'block';">
                                        Yes
                                    </div>
                                    <div style="margin-bottom:15px;"><input type="radio"
                                                                            name="DisplayTechnicalRequirements"
                                                                            value="No" style="left:0;position: inherit;"
                                                                            onclick="javascript:document.getElementById('show-technical-requirements').style.display = 'none';document.getElementById('ApplicationForm_ApplicationForm_ShowTechnicalRequirements').value = '';">
                                        No
                                    </div>

                                    <div class="row" id="show-technical-requirements" style="display: none;">
                                        <div class="col-sm-12">
                                            <label for="$ID">Please specify your technical requirements</label>

                                            <div class="form-group">
                                                <% if $Type == 'textarea' %>
                                                    <Textarea name="{$Name}"
                                                              id="{$ID}" $AttributesHTML>{$Value}</Textarea>
                                                <% else %>
                                                    <input $AttributesHTML />
                                                <% end_if %>
                                            </div>
                                        </div>
                                    </div>

                                <% end_with %>

                                <%--<% with $Fields.dataFieldByName('ShowRequirements') %>
                        <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                        <div class="form-group">
                            <label for="{$ID}">{$Title} </label>
                            <input $AttributesHTML value="{$Value}"/>
                        </div>
                    <% end_with %>--%>

                                <label>Venue Preference*</label>

                                <div class="row">
                                    <% with $Fields.dataFieldByName('VenuePreferences') %>
                                        <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                        <% loop $Options %>
                                            <div class="col-sm-4">
                                                <div class="form-group form-group-checkbox">
                                                    <input type="checkbox" name="{$Up.Name}[$Value]" value="{$Value}"
                                                           id="{$ID}"
                                                           class="form-control" <% if $isChecked %>
                                                           checked="checked"<% end_if %><% if $isDisabled %>
                                                           disabled="disabled"<% end_if %>  />
                                                    <label for="{$ID}">{$Title}</label>
                                                </div>
                                            </div>
                                        <% end_loop %>
                                    <% end_with %>
                                </div>
                            </fieldset>
                            <hr/>

                            <% loop $ApplicationLocations %>
                                <fieldset id="ScrollSpy{$Up.getLocationIndexPosition($Pos)}">
                                    <div class="legend">
                                        {$Up.getLocationIndexPosition($Pos)}. {$Title} Venue Preference
                                        <div class="dashboard-form-tooltip">
                                            <div class="label">?</div>
                                            <div class="content">
                                                <p>If you are not familiar with any of the venues, please look at the
                                                    Venues page on the Performers Hub for vibe, capacity, floor plans &amp;
                                                    technical inclusions. We try to make sure you are in the
                                                    most suitable venue for your
                                                    show so please consider these selections carefully. The typical show
                                                    length is 1
                                                    hour. There is minimal room
                                                    in the programme for longer duration shows. Our seasons run for 5-6
                                                    nights.
                                                    Shows wanting a week long season
                                                    are usually prioritised over shows wanting to do a one-off or
                                                    two/three night
                                                    season. If you wish to do an
                                                    a-typical season length, please let us know why.</p>
                                            </div>
                                        </div>
                                    </div>

                                    <h3>Opt out</h3>

                                    <% with $Up.getLocationField($ID, '[OptOut]') %>
                                        <div class="form-group form-group-checkbox">
                                            <input type="checkbox" $AttributesHTML />
                                            <label for="{$ID}">$Title</label>
                                        </div>
                                    <% end_with %>
                                    <br/>

                                    <div id="location-{$ID}-section">
                                        <p>Please note that we do our best to try and take your venue, date and time preference into account when programming, but there are a huge amount of factors that go into this and sometimes it’s just not possible.</p>

                                        <h3>Select your preferred {$Title} venue</h3>

                                        <div class="row">
                                            <div class="col-sm-6">
                                                <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][VenueChoice][1]') %>--%>
                                                <% with $Up.getLocationField($ID, '[VenueChoice][1]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group form-group-select">
                                                        <label for="$ID">1st choice*</label>

                                                        <div class="lg-select">
                                                            {$SVG('select-arrow').extraClass('svg-arrow').Width('11').Height('9')}
                                                            $Field
                                                        </div>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                            <div class="col-sm-6">
                                                <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][VenueChoice][2]') %>--%>
                                                <% with $Up.getLocationField($ID, '[VenueChoice][2]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group form-group-select">
                                                        <label for="$ID">2nd choice*</label>

                                                        <div class="lg-select">
                                                            {$SVG('select-arrow').extraClass('svg-arrow').Width('11').Height('9')}
                                                            $Field
                                                        </div>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="col-sm-6">
                                                <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][VenueChoice][3]') %>--%>
                                                <% with $Up.getLocationField($ID, '[VenueChoice][3]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group form-group-select">
                                                        <label for="$ID">3rd choice*</label>

                                                        <div class="lg-select">
                                                            {$SVG('select-arrow').extraClass('svg-arrow').Width('11').Height('9')}
                                                            $Field
                                                        </div>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                            <div class="col-sm-6">
                                                <% with $Up.getLocationField($ID, '[VenueChoice][VenueOther]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="{$ID}">{$Title}</label>
                                                        <input $AttributesHTML class="form-control form-date"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                        </div>

    <%--
                                        <h3>Select your preferred dates</h3>

                                        <div class="row">
                                            <div class="col-xs-12">
                                                {$ApplicationPreferredDatesContent}
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="col-sm-6">
                                                <% with $Up.getLocationField($ID, '[DateChoice][1][Start]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="{$ID}">1st choice start date*</label>
                                                        <input $AttributesHTML
                                                                class="form-control form-date"
                                                                placeholder="Please select"
                                                                data-startdate="{$SiteConfig.FestivalStartDate}"
                                                                data-enddate="{$SiteConfig.FestivalEndDate}"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                            <div class="col-sm-6">
                                                <% with $Up.getLocationField($ID, '[DateChoice][1][End]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="{$ID}">1st choice end date*</label>
                                                        <input $AttributesHTML
                                                                class="form-control form-date"
                                                                placeholder="Please select"
                                                                data-startdate="{$SiteConfig.FestivalStartDate}"
                                                                data-enddate="{$SiteConfig.FestivalEndDate}"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-sm-6">
                                                <% with $Up.getLocationField($ID, '[DateChoice][2][Start]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="{$ID}">2nd choice start date*</label>
                                                        <input $AttributesHTML
                                                                class="form-control form-date"
                                                                placeholder="Please select"
                                                                data-startdate="{$SiteConfig.FestivalStartDate}"
                                                                data-enddate="{$SiteConfig.FestivalEndDate}"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                            <div class="col-sm-6">
                                                <% with $Up.getLocationField($ID, '[DateChoice][2][End]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="{$ID}">2nd choice end date*</label>
                                                        <input $AttributesHTML
                                                                class="form-control form-date"
                                                                placeholder="Please select"
                                                                data-startdate="{$SiteConfig.FestivalStartDate}"
                                                                data-enddate="{$SiteConfig.FestivalEndDate}"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="col-sm-6">
                                                <% with $Up.getLocationField($ID, '[DateChoice][3][Start]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="{$ID}">3rd choice start date*</label>
                                                        <input $AttributesHTML
                                                                class="form-control form-date"
                                                                placeholder="Please select"
                                                                data-startdate="{$SiteConfig.FestivalStartDate}"
                                                                data-enddate="{$SiteConfig.FestivalEndDate}"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                            <div class="col-sm-6">
                                                <% with $Up.getLocationField($ID, '[DateChoice][3][End]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="{$ID}">3rd choice end date*</label>
                                                        <input $AttributesHTML
                                                                class="form-control form-date"
                                                                placeholder="Please select"
                                                                data-startdate="{$SiteConfig.FestivalStartDate}"
                                                                data-enddate="{$SiteConfig.FestivalEndDate}"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                        </div> --%>

                                        <h3>Select your preferred times</h3>

                                        <div class="row">
                                            <div class="col-sm-6">
                                                <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][TimeChoice][1]') %>--%>
                                                <% with $Up.getLocationField($ID, '[TimeChoice][1]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group form-group-select">
                                                        <label for="$ID">1st choice*</label>

                                                        <div class="lg-select">
                                                            {$SVG('select-arrow').extraClass('svg-arrow').Width('11').Height('9')}
                                                            $Field
                                                        </div>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                            <div class="col-sm-6">
                                                <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][TimeChoice][2]') %>--%>
                                                <% with $Up.getLocationField($ID, '[TimeChoice][2]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group form-group-select">
                                                        <label for="$ID">2nd choice*</label>

                                                        <div class="lg-select">
                                                            {$SVG('select-arrow').extraClass('svg-arrow').Width('11').Height('9')}
                                                            $Field
                                                        </div>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="col-sm-6">
                                                <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][TimeChoice][3]') %>--%>
                                                <% with $Up.getLocationField($ID, '[TimeChoice][3]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group form-group-select">
                                                        <label for="$ID">3rd choice*</label>

                                                        <div class="lg-select">
                                                            {$SVG('select-arrow').extraClass('svg-arrow').Width('11').Height('9')}
                                                            $Field
                                                        </div>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                        </div>

                                        <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][ChoiceReasons]') %>--%>
                                        <% with $Up.getLocationField($ID, '[ChoiceReasons]') %>
                                            <% if $Message %><span
                                                    class="message $MessageType">$Message</span><% end_if %>
                                            <div class="form-group">
                                                <label for="{$ID}">{$Title}</label>
                                                <textarea name="{$Name}" id="{$ID}"
                                                          class="form-control">$Value</textarea>
                                            </div>
                                        <% end_with %>

                                        <div class="row">
                                            <div class="col-sm-6">
                                                <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][IdealCapacity]') %>--%>
                                                <% with $Up.getLocationField($ID, '[IdealCapacity]') %>

                                                    <div class="form-group">
                                                        <label for="$ID">{$Title}</label>
                                                        <input $AttributesHTML class="form-control"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                            <div class="col-sm-6">
                                                <%--<% with $Fields.dataFieldByName('VenueChoices[{ID}][IdealLength]') %>--%>
                                                <% with $Up.getLocationField($ID, '[IdealLength]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="$ID">{$Title}</label>
                                                        <input $AttributesHTML
                                                                class="form-control"/>
                                                    </div>
                                                <% end_with %>
                                            </div>

                                        </div>
                                      <div class="form-group">
                                                <% with $Up.getLocationField($ID, '[UnavaiableFor]') %>
                                                    <% if $Message %><span
                                                            class="message $MessageType">$Message</span><% end_if %>
                                                    <div class="form-group">
                                                        <label for="$ID">{$Title}</label>
                                                        <input $AttributesHTML
                                                                class="form-control"/>
                                                    </div>
                                                <% end_with %>
                                            </div>
                                    </div>
                                </fieldset>
                                <hr/>
                            <% end_loop %>

                            <fieldset id="ScrollSpy$getStepIndex(4)">
                                <div class="legend">
                                    $getStepIndex(4). Other Performances
                                    <div class="dashboard-form-tooltip">
                                        <div class="label">?</div>
                                        <div class="content">
                                            <p>We’d like to know what else is on the agenda for you and this show
                                                in the time surrounding NZ International Comedy Festival. Knowing
                                                where performers or shows are coming from/going to, helps us know
                                                date availability, marketing reach, word of mouth, life of the show.</p>
                                        </div>
                                    </div>
                                </div>
                                <p>We know your plans for next year might still be up in the air, this is just to give us an idea of what you might be planning.</p>

                                <% with $Fields.dataFieldByName('InvolvedInOtherShows') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="form-group">
                                        <label for="{$ID}">{$Title}</label>
                                        <textarea name="{$Name}" id="{$ID}" class="form-control">$Value</textarea>
                                    </div>
                                <% end_with %>

                                <label class="form-group-checkbox-label">Are you applying for / planning on attending
                                    any other
                                    Festivals with THIS show?</label>

                                <div class="row">
                                    <% with $Fields.dataFieldByName('PerformingSameShowAt') %>
                                        <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                        <% loop $Options %>
                                            <div class="col-sm-6">
                                                <div class="form-group form-group-checkbox">
                                                    <input type="checkbox" name="{$Name}" value="{$Value}" id="{$ID}"
                                                           class="form-control" <% if $isChecked %>
                                                           checked="checked"<% end_if %><% if $isDisabled %>
                                                           disabled="disabled"<% end_if %> />
                                                    <label for="{$ID}">{$Title}</label>
                                                </div>
                                            </div>
                                        <% end_loop %>
                                    <% end_with %>
                                </div>

                                <label class="form-group-checkbox-label">Are you applying for / planning on attending
                                    any other
                                    Festival with ANOTHER show?</label>

                                <div class="row">
                                    <% with $Fields.dataFieldByName('PerformingDifferentShowAt') %>
                                        <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                        <% loop $Options %>
                                            <div class="col-sm-6">
                                                <div class="form-group form-group-checkbox">
                                                    <input type="checkbox" name="{$Name}" value="{$Value}" id="{$ID}"
                                                           class="form-control" <% if $isChecked %>
                                                           checked="checked"<% end_if %><% if $isDisabled %>
                                                           disabled="disabled"<% end_if %> />
                                                    <label for="{$ID}">{$Title}</label>
                                                </div>
                                            </div>
                                        <% end_loop %>
                                    <% end_with %>
                                </div>

                                <% with $Fields.dataFieldByName('AnyOtherFestivals') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <div class="form-group">
                                        <label for="{$ID}">Any other festivals? Please specify</label>
                                        <input $AttributesHTML class="form-control"/>
                                    </div>
                                <% end_with %>
                            </fieldset>
                            <hr/>
                            <fieldset id="ScrollSpy$getStepIndex(5)">
                                <div class="legend">
                                    $getStepIndex(5). Confirmation
                                    <div class="dashboard-form-tooltip">
                                        <div class="label">?</div>
                                        <div class="content">
                                            <p>Once your application is submitted you will not be able to edit it.
                                                All information will remain confidential. The Festival Programming
                                                team will be in touch with you we require any further information
                                                and with the outcome of your application. If you have any questions in
                                                the meantime,
                                                please contact the Festival office.</p>
                                        </div>
                                    </div>
                                </div>

                                <% with $Fields.dataFieldByName('Signature') %>
                                    <% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
                                    <h3>Signature of applicant/s*</h3>

                                    <div class="form-group form-group-checkbox">
                                        <input type="checkbox" name="{$Name}" value="1" id="{$ID}" $AttributesHTML />
                                        <label for="{$ID}">{$Title}</label>
                                    </div>
                                <% end_with %>
                            </fieldset>
                            {$HiddenFields}

                            <hr style="margin-bottom:20px;"/>
                            <p>
                                When you submit your form you won't receive an email right away. After submission please scroll down to the bottom of the Application page and ensure your Application status is ‘Submitted’. Note: if it says 'Draft/Open' you have not submitted your Application.
</p>
<p>
                                When Applications have closed we will be emailing out a confirmation. If you don't receive this, get in touch with the Festival office to confirm receipt of your Application.
                            </p>
                            <hr style="margin-bottom:20px;"/>
                            <div class="btn-group text-left">
                                <input type="submit" name="action_doSubmit" value="Submit application"
                                       class="btn btn-yellow"
                                       id="ApplicationFormSubmit"/>
                                <input type="submit" name="action_doSave" value="Save draft" class="btn btn-grey"
                                       id="ApplicationForm_ApplicationForm_action_doSubmit"/>
                            </div>
                        </form>
                    <% end_with %>
                    <div id="ScrollSpyEnd" class="scrollspy-end"></div>
                </div>
            </div>
        </div>
    </div>

</section>
<script type="text/javascript">
    setTimeout(
        function () {
            var draftTrigger = document.getElementById('ApplicationForm_ApplicationForm_action_doSubmit');
            var form = $('#ApplicationForm_ApplicationForm');
            form.parsley();

            draftTrigger.addEventListener(
                'click',
                function (event) {
                    form.parsley().destroy();
                }
            );
        }, 1000
    )
</script>
