Example 3: Keep controle over things.
Pagepath is a bit strange and new to many people. Therefore I did some thinking and came up with some cool 'controle features'.
- it is possible to set a default value for your pagepath…
- if is also possible to limit to number of pull down boxes.
in action
Here's how you do it:
- Create a _template form.
- Add someformatting to your site-theme
- Create the page for the default value yourself
So this is the code for your form _template. For people who never heard of live templates, please search on the community forum for it. It is well explained there.
The template has two major blocks:
- display of the form
- form definition
[!-- display of form content --]
You just entered the following location:
[[iframe http://pagepath.wikidot.com/%%form_raw{location}%% frameborder="0" height="22px", width="400px" scrolling="no" style="float:right;"]]
====
[!-- form defintion --]
[[form]]
fields:
generallabel:
type: static
value: "We would like to know more about you and we notice that other users find it very interesting to know more about somebody before contacting them. This is general information, which is not specific engough, but gives a fairly good image of someone. So please provide as much as possible"
locationlabel:
type:static
value: **If you add a "new item" to the lists below, ALWAYS press "enter" so it gets saved.**
location:
label:Location
type:pagepath
category:location
default:location:my-town
[[/form]]
There is an I-frame in the display of the form. This is to display the breadcrumbs of your location. Which made more sense to me, but as you may notice… it is clickable so that is a bit strange.