15. file-name-field
Prev | Chapter 5. Content objects | Next

## 15. file-name-field

file-name-field(`key`, `value`, ..., `key`, `value`)

Inserts in generated content both a text field control and a button which can be used to browse files. These controls can be used to edit the value of the element which is the target of the CSS rule. If "attribute, `attribute_name`" is specified, these controls can be used to edit the value of an attribute of this target element.

Key | Value | Default | Description
--- | --- | --- | ---
attribute | Qualified name of attribute to be edited | No default | Without this parameter, the control is used to edit the value of the element for which the control has been generated.
columns | Positive integer | 20 | Width of the text field in characters.

absolute

Boolean: yes|no, 1|0, "true"|"false", "on"|"off"

no

Configures the file chooser dialog box.

yes

  Dialog box returns an absolute path.

no

  Dialog box returns a path which is relative to the entity containing the target element (when possible).

directory

Boolean: yes|no, 1|0, "true"|"false", "on"|"off"

no

Configures the file chooser dialog box.

yes

  Dialog box can only select directories.

no

  Dialog box can only select files.

save

Boolean: yes|no, 1|0, "true"|"false", "on"|"off"

no

Configures the file chooser dialog box.

yes

  Dialog box can select existing files or directories, as well as files and directories to be created.

no

  Dialog box can only select existing files or directories.

url

Boolean: yes|no, 1|0, "true"|"false", "on"|"off"

yes

Configures the file chooser dialog box.

yes

  Dialog box returns URLs

no

  Dialog box returns file names.

`Key`, `value`, ..., `key`, `value` may also specify style parameters.

Examples:

    file-name-field(attribute, value,
                    columns, 40,
                    font-family, monospaced)

    file-name-field(absolute, yes,
                    directory, yes,
                    save, yes,
                    url, no,
                    columns, 40,
                    font-family, monospaced)

Prev | Up | Next
14. drop-site | Home | 16. gadget