What is the correct way to send CSS with a Notes form?
I have found if you place the CSS on a subform and include the subform on your form and use NotesUiDocument.Send or @MailSend to send the document then the CSS is sent with the form or at least what appears to be the CSS, could be that form is just rendered according to CSS. Either way, the form is sent with expected colors and fonts. But not for all users. One user is getting the form as if there was no CSS present on the form, no colors.
Has anyone been able to get CSS working properly with send with form documents in the Notes Client?
Another option that you could use is not putting the CSS in the form but referencing it on the server. In the HTML Head Content of the form you send out you could link to a CSS on a server like the example below.
I generally advise against using send with form. If it’s something the user needs to edit, they should edit it in the database it comes from. And if it’s not something they need to edit, you are just mailing them a report – which you can do with MIME in the body of a regular memo, including the CSS. This takes up less space in people’s mail files, which makes the admins happy.
Well that is no possible. There are no documents in this database. It is a database of forms that get mailed to peoples databases. The there are lots of different forms in this group of databases. Using Mime to mail them would make development of the forms extremely time consuming.
All right – so what’s different about this one user? Are they using the same version of Notes as the rest? Do they have on their workspace the database icon for, and access to, the database that the form came from? Do they have a local replica of the application, or does their workspace point them to a different replica than the one you are using, which might not have the stylesheet in it?
I haven’t messed much with shared forms and I don’t know offhand how they do CSS. But I wouldn’t really have expected this to work. I suggest you try to figure out exactly how it does work for the users for whom it does. Is the CSS really included with the form, or do most users somehow have a copy of it in their mail file, or are they referencing back to it in the original database? Notice, when you insert a stylesheet you can choose what database it comes from. What did you choose, “current database” or did you select the database by name from the list? It might well make a difference (specifically, the latter seems more likely to work since “current database” is the user’s mail file when they are using the form).
The stylesheet is a shared design element and when you insert it on a form (or subform) you aren’t inserting a copy, but a reference. I know the stored forms code does odd things to get the subform data into the document, but that it would include the CSS? Don’t know.