backoffice: apply form js to quick form preview (#53628)
This commit is contained in:
parent
16ef227eb0
commit
9e8c88ce07
|
@ -1138,6 +1138,7 @@ class FormDefPage(Directory):
|
|||
|
||||
def get_preview(self):
|
||||
form = Form(action='#', use_tokens=False)
|
||||
form.attrs['data-backoffice-preview'] = 'on'
|
||||
on_page = 0
|
||||
for i, field in enumerate(self.formdef.fields):
|
||||
field.id = i
|
||||
|
|
|
@ -335,7 +335,7 @@ $(function() {
|
|||
|
||||
}
|
||||
|
||||
add_js_behaviours($('form[data-live-url]'));
|
||||
add_js_behaviours($('form[data-live-url], form[data-backoffice-preview]'));
|
||||
|
||||
// Form with error
|
||||
const first_widget_with_error = document.querySelector('.widget-with-error');
|
||||
|
|
Loading…
Reference in New Issue