add form_error_tpl <template>

This commit is contained in:
Frédéric Péters 2023-04-04 10:43:22 +02:00
parent a4b235b333
commit be1805b6e9
1 changed files with 7 additions and 0 deletions

View File

@ -933,6 +933,13 @@ class FormPage(FormdefDirectoryBase, FormTemplateMixin):
form.attrs['data-check-condition-url'] = (
self.formdef.get_url(language=get_publisher().current_language) + 'check_condition'
)
form.widgets.append(
HtmlWidget(
'''<template id="form_error_tpl">
<div id="form_error_fieldname" class="error"></div>
</template>'''
)
)
return form
def create_view_form(self, *args, **kwargs):