cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <>
Subject AW: Accessing AJAX forms field values
Date Tue, 01 Aug 2006 10:01:50 GMT
Hi Grzegorz,

Thanks for your reply. In general your Idea sounds good. Could you explain
what you mean by "seting an attribute of zip"? Is it possible to add
additional attributes to a field? How can I access them when generating the
suggestion-list. Is there any sample code showing this?


-----Urspr√ľngliche Nachricht-----
Von: Grzegorz Kossakowski [] 
Gesendet: Dienstag, 1. August 2006 10:33
Betreff: Re: Accessing AJAX forms field values

Christofer Dutz napisal(a):
> Hi,
> I am currently working on an cforms ajax application. Here when 
> entering an address, the user enters the country code of an address 
> (the content is provided by a suggestion-list and this works fine)
> If he then starts entering the zip code only the zip codes for that 
> particular country should be shown. My first try was to access the 
> form model and get the other fields values. Unfortunately the model 
> isn’t updated until the form is really submitted.

Have you considered changing method from pulling criteria to pushing it? 
I mean it should be country field's responsibility to inform about it's 
actual value. You can use onValueChanged event to set attribute of zip 
code field.
> My next attempt was to extend the CFormsSuggest.js in the forms-jar. 
> Strangely I seem to be unable to access any other form fields, even if 
> I try to access them using the ids I found using the IE Dom Developer 
> Toolbar and by this definitively exist.

I think it not a good practice to change JS client libraries just for 
special case. CForms are server side and we should focus on this :)

Hope this helps, if not, just ask more question.

Grzegorz Kossakowski

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message