You are viewing limited content. For full access, please sign in.

Question

Question

Forms Theme deletion

asked on April 15, 2022

I'm trying to delete a custom Form Theme, but it says it is being used on a form and won't allow me to delete it.  

How can I find which forms are using the theme?  

I've queried the cf_forms table and the cf_theme table but the id from the cf_theme table for the Theme I want to delete isn't in any record of the cf_forms table.

 

0 0

Answer

SELECTED ANSWER
replied on January 8, 2023

With Forms 11 Update 3, it will show the list of classic forms that are using the theme when deleting the custom theme.

You can see other changes of Forms 11 Update 3 from  https://support.laserfiche.com/kb/1014413/list-of-changes-for-laserfiche-forms-11-update-3 and get Forms 11 Update 3 from Laserfiche 11 package  https://support.laserfiche.com/kb/1014263/software-versions-and-fixes-included-in-the-laserfiche-11-download-package

1 0

Replies

replied on April 17, 2022
  select * from cf_forms where theme_id in (select id from cf_theme where name='{themename}' or show in(select id from cf_theme where name='{themename}')) 

Please check whether you get any result when you run above queries. We will enhance it to show the forms list when delete the theme so you can tell which forms use the theme easily. 

0 0
replied on April 18, 2022

Sorry, I'm not getting any results with that query and the theme is still unable to be deleted.

0 0
replied on April 18, 2022

Did you replace "{themename}" with the actual theme name in the query I provided? I forgot to mention that. 

0 0
replied on April 19, 2022

Yes I did

0 0
replied on April 20, 2022

What version of Forms are you using? I reviewed the code for delete the them, the logic is following:

1. find a list of themes' id based on the id of the selected theme by checking the value of "show" column matches the id of the selected theme

2. select the list of forms based on the result of step 1 by checking the value of "theme_id" column in cf_forms matches.

Can you follow the above logic to check the values in the database?

0 0
replied on April 21, 2022

We are on Laserfiche Forms Professional Version 11.0.2201.20436.

I found the id of the Theme in the cf_theme table, but the show column is NULL for that theme. The id is not found in the theme_id column for any records of the cf_forms table.

It seems that even though most of my forms use the same theme, a new theme is created in the cf_forms table for each form.

0 0
replied on April 22, 2022

Yes, a new theme will be created for each form and it uses the "show" column value to refer to the saved custom theme.  The saved custom theme can only be deleted when no other themes refer to it. 

You can check whether there is any row in cf_theme table that has show column value equals to the id of the saved custom theme you have found, record the ids of those rows, then check whether you can find those ids in the theme_id column of the cf_forms table.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.