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

Collapse
Posted by Richard Hamilton on
Thanks for clarifying that Dave.

I think that one way to implement this is to generate a unique key from an established sequence at form creation time, possibly in the conditional block:

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

The key can then be included in the form as a hidden field which means that no matter how many times the form is submitted, the unique key identifies the transaction. If it has already been committed to the db then it can either be quietly absorbed or rejected as duplicate.

There may be other ways of doing this but this seems a logical and elegant option.

R.