Forum OpenACS Q&A: Re: "the right way" to store values from checkboxes in the CR?

Error in include template "/var/www/openacs/packages/openacs-bootstrap3-theme/resources/templates/packages/forums/lib/search/search-form": can't read "form:id": no such variable
Tammy,

Looks like you need a mapping table. The content repository only stores some default attributes. If you need to store any additional attributes you need to create a table to store them.

If you have a one-to-many relationship between items and attribute values, you'll need a table that looks like this:

create table item_attribute_values (
    revision_id integer references cr_revisions,
    attribute_value varchar (or whatever is appropriate, possibly boolean)
);

THen you would store one row for each instance of the attribute for each item.

I haven't seen anyplace this is used, but it should work.

Usually there is just one value for each additional attribute.