# # Form # # a) List of forms: {{form:S}}='', {{formIdHistory:S}}='' # b) Edit Form: {{form:S}} - Open form {{form:S}} with record {{r:S}} - typically the FormEditor # c) Use history of a given form: {{formIdHistory:S}} # # {{form:S}} # {{formIdHistory:S0}} - usage history of form '{{formIdHistory:S}}' form={{form:SE}} dbIndex={{indexQfq:Y}} 10.sql = SELECT f.id , f.name , f.title , f.tableName , COUNT(fsl.id) AS submit_count , MIN(fsl.created) AS submit_first , MAX(fsl.created) AS submit_last , GROUP_CONCAT(DISTINCT fsl.pageId ORDER BY fsl.pageId) AS submit_pages FROM Form AS f LEFT JOIN FormSubmitLog AS fsl ON fsl.formId=f.id WHERE '{{form:SE}}'='' AND {{formIdHistory:S0}}=0 GROUP BY f.id ORDER BY f.name 10.twig = {% if result|length > 0 %} {% for row in result %} {% endfor %}
{{ ('p:'~store.typo3.pageAlias~'|s|N|U:form=form') | qfqlink }} {{ ('p:'~store.typo3.pageAlias~'|s|G:glyphicon-th-list|o:Edit as JSON|U:form=formJson') | qfqlink }}
Name Title Table # Frist Last PageId
{{ ('p:'~store.typo3.pageAlias~'|s|E|U:form=form&r='~row.id) | qfqlink }} {{ ('p:'~store.typo3.pageAlias~'|s|G:glyphicon-th-list|o:Edit as JSON|U:form=formJson&r='~row.id) | qfqlink }} {{ row.name }} ({{ row.id }}) {{ row.title[:50] }}{%- if row.title|length > 50 -%} {{ row.title[50:] }} {% endif %} {{ row.tableName }} {% if row.submit_count == 0 %} {% set mode = "|r:3" %} {% else %} {% set mode = "" %} {% endif %} {{ ('p:'~store.typo3.pageAlias~mode~'|U:formIdHistory='~row.id~'|s|b|t:'~row.submit_count~'') | qfqlink }} {{ row.submit_first ? row.submit_first|date('Y-m-d') : "-" }} {{ row.submit_last ? (date(row.submit_last).diff(date()).days~" days ago") : "-" }} {{ row.submit_pages }}
{% endif %} 20.sql = SELECT f.name , fsl.feUser , fsl.recordId , fsl.pageId , fsl.created FROM FormSubmitLog AS fsl LEFT JOIN Form AS f ON fsl.formId=f.id WHERE fsl.formId={{formIdHistory:S0}} ORDER BY fsl.created DESC 20.twig = {% if result|length > 0 %}

Submit History for {{ result.0.name }}

Back {% for row in result %} {% for col in row %} {% endfor %} {% else %} {# this should never happen, as we do not provide a link if there is no history #} {% endfor %}
FormfeUserrecordIdpageIdSubmit
{{ col }}
no history found
Back {% endif %}