PDA

View Full Version : FormPanel.Load() --> JSON --> Checkbox ??



bodyboarder20
25 Feb 2010, 1:31 PM
Hello!

I'm currently loading the values for a FormPanel using the built in load() method (JSON)... Of the elements on the form, one of the fields is a single checkbox, and I'd like for my data that is loaded to also effect the checkbox based on the value....

Does anyone have any idea how I can go about this?

Thanks!

bodyboarder20
26 Feb 2010, 6:01 AM
Bueller?

moegal
26 Feb 2010, 7:07 AM
do you mean have it check it or not based on the value. It should already do that.
Saki has an example of that "Form Load and Submit"

http://examples.extjs.eu/

Marty

bodyboarder20
26 Feb 2010, 7:26 AM
Ah! Thanks! Yeah I was returning the values "NO" and "YES" because thats what we store in our database, I was hoping thered be a way I can easily correlate NO->unchecked, YES-> checked, but I decided the easier route was jsut to convert it to a YES/NO combo :)

Thanks Marty!

moegal
26 Feb 2010, 11:58 AM
I ran into that before, I just make sure I convert the values server side to the extjs accepted format.

Glad I could help.

Marty