Re: dbforms2 - chooser, tableprefix
Christian Stocker <[email protected]>
| Newsgroups | gmane.comp.cms.bitflux.general |
|---|---|
| Message-ID | <[email protected]> |
Hi
On 17.7.2005 15:44 Uhr, Matthias Dieke wrote:
> Hi,
>
>
>
> This is my dbform-file:
>
> <dbform:form xmlns:dbform="http://bitflux.org/dbforms2/1.0">
>
> <dbform:fields table="spielerposition">
>
> <dbform:field name="position" type="text" descr="Position"
> onkeyup="updateUriField('field_position',document.getElementById('field_uri'));">
>
> </dbform:field>
>
>
> <dbform:field name="uri" type="text" descr="uri"
> onkeyup="this.edited = true;"></dbform:field>
>
> <dbform:chooser namefield="position" wherefields="position"
> orderby="l" limit="35"/>
>
> </dbform:fields>
>
> </dbform:form>
>
>>
>>
>> "namefield" is the fields which are displayed in the dropdown (you have
>> to use the sql function concat() if you want to display more than one
>> field there, so for example "concat(uri, ' - ' ,id)")
>
>
>
> "position" should be shown --> namefield="position"
>
>
>>
>> "wherefields" is in which fields it should search, comma seperated
>
>
> Search for what??? My where field is "position" too. Or should I use "id"?
If you type something in the search field on the top, it searches in the
fields you define in the wherefields. If you just want to search in the
position field then define just that there. Like you did in your xml above.
For example in the blogposts dbforms2 implementation, we want to search
in the in the post_contents and post_title field, but we only want to
display the post_title. That's the reason, why these are 2 different fields.
chregu
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | [email protected] | gnupg-keyid 0x5CE1DECB
--
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms