Questions answered by this recipe
How can I replace or customize my Site.EditForm?
Provide administrators and authors with examples and instructions for replacing or customizing their site's Site.EditForm.
- Working within the wiki, you have two options:
- modify Site.EditForm to your needs,
- create Site.EditForm1, Site.EditForm2, etc, and add conditional statements in the original Site.EditForm to determine which form is displayed.
- Working on the server-side as well as within the wiki, you have at least two options:
- place a custom EditForm page somewhere and add a line in config.php to point to (for instance) Site.Custom-EditForm:
Site.Gemini-EditForm is a wide edit form with an extra row of buttons above the edit textbox. It suppresses the sidebar and the titlebar to maximise editing space.
An EditForm in which the preview and quickhelp pane pops up on top of the edit textbox. No more downscrolling is necessary to view the preview.
Included in the zip is also an alternative version popup2edit.php which will load the styles needed from separate stylesheets. These need copying to Farmpub/css/
The styles are optimised for display in Gemini, Fixflow and Triad skins. For other skins some small adjustments of the values to position the preview optimally may be necessary.
Preview with every edit
You can replace part of the markup on the Site.EditForm to force the display of the page preview whenever
Edit the existing Site.EditForm and make the following replacement in its text:
Replacement (note that the
Make "minor edit" the default save behavior
Edit the Site.EditForm page, and change the
(:input e_minorcheckbox checked=1:)
Warn user when editing and saving a new page will create a new wiki group
Display a warning when a user is creating a page in a non-existent wiki group.
- Create a warning page.
- Edit Site.EditForm to include the new warning page under the condition that the page being edited is in a group that has no Group.RecentChanges page.
Details appear on Cookbook:NewGroupWarning.
Add labels to the edit form to make it more accessible
- Cookbook:FormExtensions is required. Once installed, the relevant part of your edit form should look something like:
(:label e_changesummary $[Summary]::) (:input e_changesummary id="e_changesummary":)\\ (:label e_author $[Author]::) (:input e_author id="e_author":) (:input e_minorcheckbox id="e_minorcheckbox":) (:Label e_minorcheckbox $[This is a minor edit]:)\\
- Site.EditForm, Cookbook:Forms#pageeditcontrols
- Cookbook.UserConfigurations, PmWiki.SitePreferences and Site.Preferences
- PmWiki.BasicVariables#SiteGroup, PmWiki.EditVariables#PageEditFmt, PmWiki.LayoutVariables#MessagesFmt, PmWiki.SpecialPages
See discussion at EditFormSamples-Talk