fieldinfo

toc
<mm:fieldinfo>

The fieldinfo tag can be used inside a FieldProvider. It's basic goal is to provide information about the field, though it sometimes can do a little more. It can for example in some case also change the field.

If the parent fieldprovider is a fieldlist then this fieldlist does not always provide a node as well. In that case not every type of information is available.

see alsofield | fieldlist | nodeinfo | cloud
attributes
  • type
    The type of information which must be returned
    nameThe name of the field
    guinameThe GUI name of the field (can be in other language)
    descriptionThe description of the field (can be in other language)
    datatypeA String identifying the datatype of the field
    datatypedescriptionA description for the datatype of the field
    input A form entry for the field. If the surrounding FieldList has an id, the names of the form entries will be prefixed with it, so it is possible to use it for the same fields in the same form more than once. The post of the form should be treated with corresponding mm:fieldinfo type='useinput's.
    useinput

    If you have created a form with type="input" and this form was submitted, then you can use type="useinput", and it will get the request/post parameter produced by "input" and make the right changes to the parent field.

    The necessary externid's for this will be implicitly imported in the context. You don't have to worry about them.

    `useinput' is exceptional because it doesn't really produce any `info' about the field, but rather changes it.

    Can only be used if the parent FieldProvider also provides a Node.

    searchinput A form entry for the field, fit for use for searching. That means that no textareas will be used and such.
    usesearchinput If you have created a form with type="searchinput" and this form was submitted, then you can use this. It will produce a part of a where clause which you can use to construct a whole `where' for the list tag you are going to use.
    reusesearchinput Adds the search query to the surrounding param-handler, like an mm:url.
    value The value of this field. Can only be used if the parent FieldProvider also provides a Node.
    guivalue The guivalue of this field. Can only be used if the parent FieldProvider also provides a Node (can be in other language).
    type The storage type of this field. Which is an integer. You may like typedescription.
    typedescription The storage type of this field, as a string. Like 'string', 'integer', 'long', 'xml'.
    guitype The guitype of this field. The guitype further specializes on the type, and can be found in the guitype field of builder xml's. The combination of type/guitype is used by e.g. the `input' version of this tag, to create feasible HTML input entries.
    check Only checks whether the field's value is valid. If not, that is reported to a parent form tag.
    errors Like 'check', but displays the error messages if not valid.
  • options
    Specify additional parameters for the presentation/manipulation of the field.
    datetime If the value is a date-time, treat it as a date time combination. This is deprecated. In 1.8 you can indicate this with the pattern setting on the datatype.
    time If the value is a date-time, treat it as time only This is deprecated. In 1.8 you can indicate this with the pattern setting on the datatype.
    date If the value is a date-time, treat it as date only. This is deprecated. In 1.8 you can indicate this with the pattern setting on the datatype.
    extra:onchange='doStuff()' if the type is `input' then you might want to add javascript on the onchange (or add other attributes, like `style' or so) This is deprecated. In 1.8 the produces input entries have very precise CSS classing, which can be used to implicitely attach events on load of the window.
    noemptyif the type is `input', then in certain cases (e.g. when using AJAX), you want that never empty textareas are produced
    trimif the type is `useinput', then the value is trimmed first. Used in conjunction with the 'noempty' option on the corresponding input field
  • datatype (since: MMBase-1.8)
    On default, the datatype of the specified field is used. But this can be overridden.
fieldreferrer attributes
nodereferrer attributes
contextwriter attributes
contextreferrer attributes
writer attributes
example 1
See the example for tags `cloud' and `nodeinfo'.