&formTPL=`pressform`
<form action="[~[*id*]~]" name="tvExplorer" id="tvExplorer" method="get">
<!-- If FURLS ARE OFF
<input type="hidden" value="[*id*]" name="id" />
-->
<fieldset>
[+tve.keywordsSearch:label->Keywords:searchStyle->partial:size->25+]
</fieldset>
<fieldset>
[+tve.dateElt:name->debutdatePub:source->createdon:label->Created between:type->text:filter->3:size->10:maxlength->10+]
[+tve.dateElt:name->findatePub:label->and :source->createdon:type->text:filter->4:size->10:maxlength->10:dateType->max+]
</fieldset>
<fieldset class="sendForm">
<input id="tve_search" name="search" value="Search" type="submit">
</fieldset>
</form>
And the snippet call
[[tvExplorer?
&formTPL=`pressform`
&dittoName=`ditto202`
&dittoSnippetParameters=`depth:5|tpl:tplPress|parents:11552|display:25|paginate:1`
]]
[+tve.searchForm+] [+tve.dittoList+]
The form output
Some explanations:
[+tve.keywordsSearch:label->Keywords:searchStyle->partial:size->25+]
[+tve.keywordsSearch+] is a special tag. It creates an input field.
If this field is filled tvexplorer will execute a modified version of AjaxSearch
The params of
keywordsSearch
- label->Keywords (label for the input field)
- searchStyle->partial (determine SQL statement)
- size->25 (field size)
[+tve.dateElt:name->findatePub:label->and :source->createdon:type->text:filter->4:size->10:maxlength->10:dateType->max+]
[+tve.dateElt+] create a text to type date.
Params are
name -> name of the field (mandatory)
source-> which field or tv to search
filter-> ditto filter to apply
dateType-> date method to calculate time stamp
dateFormat -> the date format (dmy or ymd or mdy)
dmy=> 12/07/2007
mdy=>07/12/2007
ymd=>2007/07/12
dateSplitter -> / for instance if expected format is 12/07/2007
:-)