G Tellez wrote:
Hi all,

I'm having some troubles with form re-display using the formlets'
checkbox/choiceDefault routines (redisplay for error handling and/or redisplay to retrieve saved information stored in the database).

------------------
e.g. for checkbox:
------------------

- let's say in the formlet i have a field called "bannerOpt" defined
by: {checkbox -> bannerOpt}

- if I submit the form having an error in any other field (i.e. input
field), the form is re-displayed pointing the input field error... BUT
it doesn't save any checked/unchecked state in the checkbox object.

- if I have stored in the DB "bannerOpt" as a BOOL with the value of TRUE, and I'm using a formlet to edit "bannerOpt" value, I don't know how to display a checked state in a checkbox object inside the formlet after retrieving its value from the DB.

- then, the question for the previous cases is: how can I display a checkbox routine as checked if 1)I'm re-displaying a form after an error handling process and 2) if I'm retrieving its value from a TRUE/FALSE field in the DB?

------------------------------
e.g. for choice/choiceDefault:
------------------------------

- let's say in the formlet i have a field called "ctry" defined
by:

{choiceDefault(
[ ("UK","UK"),("USA","USA"),("Canada","Canada")],
userInfo.ctry) -> ctry}

- if I submit the form having an error in any other field (i.e. input
field), the form is re-displayed pointing the input field error... BUT
it doesn't save the previously selected value in the choice/choiceDefault object.

- if I have stored in the DB "ctry" with the value "UK" and I use a formlet to edit a user using a choiceDefault routine, there's no problem here.

- so the question is mainly for the first case: how can I display the previously selected value in a choice/choiceDefault routine if I'm re-displaying a form after an error handling process?

Hope anyone can help me through this,

Best regards,

Gabriel

This is a bug in the formlets library. Ezra is fixing it right now.

Sam
_______________________________________________
links-users mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/links-users

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply via email to