Forum OpenACS Q&A: Re: How are xowiki.Formfields of type form_page specified?

Posted by Gustaf Neumann on
Concerning the first question: in case the hotel form defines ht_iata_code as a text field (type text), your example should works, when you remove the single quotes around MCO.

The where clause is translated either to a tcl-based filter (fetching all instances of the form into memory and applies the filter afterwards) or - when configured - maps this into a postgres hstore query (when hstore is available in your postgres installation and the parameter use_hstore is used). The hstore stuff is currently still part of the xowf package, where fast fetching via instance attributes is necessary for larger apps (we use frequently xowf based questionnaires with several thousand participants). I am mentioning this since for the automatic query transformations, not all form field types are currently supported by the translator (this is done by the method filter_expression of FormPage).

Concerning the second question: the use of the title as label for the options was hard-wired. i've modified the code such one can use for form-field-type "form_page" the attribute "entry_label". It can be used in the form-constraints like "label" etc. Using e.g ...,entry_label=ht_iata_code,....