Skip navigation
Currently Being Moderated

Dynamic Checkboxes to Input Specific Values

Dec 19, 2008 5:07 PM

I feel I may be missing some workaround for this, but I've struggled in vain to come up with a solution I can understand.

Currently, when adding checkboxes to an ADDT dynamic form, there are but three choices for the input: 1/0 -1/0 and Y/N.

I am working on a site where I need to insert a specific value into a database field on insert or update. I'll ultimately have roughly 25 fields, that must each accept a specific value if checked (table.ac4 must have the integer 4 inserted, table.ac5 the integer 5, etc.) or NULL if unchecked.

By poking around in the code for some integral php function files, I was able to modify them and get this working exactly as described above. I posted this solution in the PHP forum:
Paul Kazmercyk, "I'm messing with KT and tNG functions files. Should I stop?" #2, 17 Dec 2008 4:37 pm

This is a workaround, and I'm not entirely comfortable modifying function files, but it does work. I'm also sure there's a way to build this in PHP using arrays, but working that out is above my skill level. So, being able to either specify a static value or using a value from a recordset to be inserted when creating the form as a choice (other than the three default options) would be better IMHO.

More Like This

  • Retrieving data ...

Bookmarked By (0)