Forum OpenACS Q&A: Re: E-commerce 'category-browse-subcategory.tcl'

Collapse
Posted by Richard Hamilton on
Torben,

I meant to post a reply to your first point about how to 'pre-generate' a primary key.

In the conditional block:

if {[template::form is_request form_one] } {
**select nextval from your_sequence**
}

Then when you set out the form specification, include a hidden field that contains the key value as the unique identifier for that interaction.

Any double click of the form's buttons will not satisfy the above condition and so will not re-generate the key.

https://openacs.org/api-doc/proc-view?proc=template::form::is_request

Regards
Richard