Page 1 of 1

Hide fields if empty

Posted: 12 May 2017
by efiro
Hello
What is the easiest way to hide fields if they are empty.
i'm going to print the form and I don't want to print the empty fields.
P.S. the fields are in a table

Thanks
Efi

Re: Hide fields if empty

Posted: 12 May 2017
by Dmitry Kozlov
Hi,

Please, insert the following code into your form via JS-editor of Forms Designer:

Code: Select all

$.each($('.fd_field'), function() {
    if (!$(this).find('.fd_control').text().trim()) { $(this).parent().hide() }
})

Re: Hide fields if empty

Posted: 12 May 2017
by efiro
Thank you :)