2:31 AMHow to set default checkboxes in Ucoz forms
Having to click same input checkmarks at Ucoz "New / Edit Entry" forms on each save was quite annoying. So I decided to set some defaults.
When opening a form for "Add new entry" / "Edit" I wanted "Substitute line feeds by the tag <BR>" to be always unchecked, "Receive notifications about comments" to be always checked, and a bunch of other checkmarks to be always checked too.
Here is the code:
Here are some gotchas:
Ucoz modules, such as Site Catalog (Links), File Catalog, Publisher have dedicated html templates for their "Entry adding/editing page"; but this is not the case for Blog! After stranding around the templates section at the Contol Panel I ended up adding the script to the "The first container" which is the section on the right-side of all pages of this site.
In all other cases I would put the code to a file and use
There is another thing to be aware of, - Ucoz automatically includes jQuery always at the end of the <head> section, which means your jQuery scripts got to be placed somewhere after <head></head>, which is not totally right, but as long as it works - I am Ok with it.
|Total comments: 0|