Linux Mint Cinnamon .
Python: 3.8.10 (default, Nov 26 2021, 20:14:08) …
BSDDB: 6.2.7 (5, 3, 28)
sqlite: 3.31.1 (2.6.0)
Tree database type is BSDDB.
I have created a new 1921 UK Census form and saved in Forms as ‘_custom.xml’
Created a related source with the ID attribute ‘UK1921’
I checked the form syntax which seems to correct, however the form does not appear in the list of available forms under the ‘new’ tab.
If I save the form as custom.xml (no underscore) no forms appear at all in gramps.
Any help appreciated. Thank You
I tried adding a new form again to ‘form_gb.xml’ and after checking for any errors saved the file.
I added a new sources with the attribute ‘Form’ and ‘UK1921’ to corresponding persons.
Save GRAMPS and backup GRAMPS. Then reboot system, and the new forms are available to use.
So it seems the re-boot was needed to finish the job?
I will also try another new form using the ’ _custom.xml later.
Thank you for your assistance.
I created a 1921 form in test.xml. I restarted Gramps - possibly I didn’t need to - and it worked without any issues straight away.
No need for a reboot (and from a technical standpoint there’s no reason, with this architecture of Gramps just reading an XML file, that a reboot would be required; indeed the only reason a Gramps restart would be required is if Gramps reads the file in a one-off operation as it starts up).
I think the restart is probably due to the way the cache is refreshed for add-ons. It is only when Gramps starts that it runs through the directories and looks for Python source that has changed and rebuilds that cache. Since the list of form collections is hard-coded and the form.py processes those collection lists the cache Form Gramplet file includes the lists & the forms.
Since Forms Gramplet is loaded in the sidebar, that cache has to be rebuilt when Gramps is not running.
I suppose you could try manually deleting the cache subdirectory in Forms Gramplet folder. But even if the cache then rebuilds, that rebuilt cache file might not supplant what is already loaded.
If the code was changed to reload the list of forms & validate them on the fly, starting the forms Gramplet could become a very slow & unreliable feature. This way, there will only be one vulnerable start per session instead of every time data on a form is shown.
I’m hoping that, in the future, the Forms GUI might be redesigned to let the (unlabeled) fields be dragged into a PDF (or scan) backdrop. That kind of layout control would make forms feel a lot less like data entry on a VT-100 terminal. [OK… Maybe a VT-220]