{template="pageHeader" group="global" app="core" params="\IPS\Member::loggedIn()->language()->addToStack('advanced_search')"} {{if $form->error}}
{$form->error}
{{endif}}
{{foreach $hiddenValues as $k => $v}} {{endforeach}}

{lang="search_parameters"}

    {{foreach $elements as $collection}} {{foreach $collection as $fieldName => $input}} {{if !is_string( $input ) AND in_array( $input->name, array( 'searchType' ) )}}
  • {lang="$input->name"}
    {{$idx = 0;}} {{$showAsGrid = ( count( $input->options['options'] ) > 3 ) ? true : false;}} {{foreach $input->options['options'] as $option => $text}} {{if $option == 'all'}} {{continue;}} {{endif}} {{if $showAsGrid && $idx % 2 == 0}}
    {{endif}} {{if $showAsGrid}}
    {{endif}} value == $option}}checked{{endif}} {{if isset( $input->options['toggles'][ $option ] ) and !empty( $input->options['toggles'][ $option ] )}}data-control="toggle" data-toggles="{expression="implode( ',', $input->options['toggles'][ $option ] )"}"{{endif}}>   {{if $showAsGrid}}
    {{endif}} {{if $showAsGrid && ( $idx % 2 != 0 || $idx == ( count( $input->options['options'] ) - 1 ) )}}
    {{endif}} {{$idx++;}} {{endforeach}}
  • {{endif}} {{endforeach}} {{endforeach}}

    {{foreach $elements as $collection}} {{foreach $collection as $fieldName => $input}} {{if !is_string( $input ) AND in_array( $input->name, array( 'q', 'tags', 'eitherTermsOrTags', 'author' ) )}} {{if $input->name == 'eitherTermsOrTags'}}
  • {lang="$input->name"}
    • value == 'or'}}checked{{endif}}>  
    • value == 'and'}}checked{{endif}}>  
  • {{else}} {$input->rowHtml($form)|raw} {{endif}} {{endif}} {{endforeach}} {{endforeach}}

    {{foreach $elements as $collection}} {{foreach $collection as $fieldName => $input}} {{if !is_string( $input ) AND in_array( $input->name, array( 'startDate', 'updatedDate' ) )}}
  • {lang="$input->name"}
    {{if isset( $collection[ $fieldName . 'Custom'] )}}
    {$collection[ $fieldName . 'Custom']->html()|raw}
    {{endif}}
  • {{endif}} {{endforeach}} {{endforeach}}

    {{foreach $elements as $collection}} {{foreach $collection as $fieldName => $input}} {{if !is_string( $input ) AND $input->name == 'joinedDate'}}
  • {lang="$input->name"}
    {{if isset( $collection[ $fieldName . 'Custom'] )}}
    {$collection[ $fieldName . 'Custom']->html()|raw}
    {{endif}}
  • {{elseif is_string( $input ) }} {$input|raw} {{elseif !in_array( $input->name, array( 'q', 'tags', 'searchType', 'eitherTermsOrTags', 'author', 'startDate', 'updatedDate', 'startDateCustom', 'updatedDateCustom', 'joinedDate', 'joinedDateCustom' ) )}} {$input->rowHtml($form)|raw} {{endif}} {{endforeach}} {{endforeach}}