cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: Accessing AJAX forms field values
Date Tue, 01 Aug 2006 08:33:13 GMT
Christofer Dutz napisał(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:

View raw message