skip to content
 
developing second generation, OpenACS commerce packages
Begin main content

No registered users in community XoWiki
in last 20 minutes

ECKS Forms

Vision Statement

Ecks Forms will manage db-assisted forms through a series of web-based forms, and provide a reliable means for getting/validating input of managed forms.

Requirements

  • provide a library of validation procs (maybe add to ad_page_contract if possible without affecting existing ad_page_contract functionality)
  • validation procs should use naming from pg casting types and other reserved-words (from tcllib?) or to check with existing column values (as in fk_us_states for example) for application side fk_ checking
  • Use ad_page_contract (or a variant) for form validation, see ad_page_contract_filter_procs and creating a proc for each value-type, which allows for consistent validation messages between forms. Do not use ad_form, to keep learning curve low and keep it simple method  (see guidelines)
  • use template::form to generate form code
  • use dynamic parts of OpenACS templating in appropriate contexts

Implementation Notes

use tcl lists and arrays to process form fields, and pass them through ad_page_contract as arrays, for example batch_field_values(index);

batch_field_index, batch_field_labels(index) and batch_field_value_type(index) would be referenced via the form_abbrev which would be parameterized ref in the pages (to allow variations from the default).   indexes will have to be verified through registered forms much how ad_page_contract requires explicit definition of incoming variables.

ecommerce doesn't use ad_form, and so may have some useful examples of how to handle arrays, underscores, periods, dashes etc with index values.

variable and proc prefixes: daf_

public procs envisioned: daf_build_form $form_abbrev, daf_validate_input $form_abbrev daf_explain_problems

provide auxiliary procs for getting (text, image and other) data from other websites.  For images, see OpenACS thread How to import image from url? (Done: see ecds_get_url and ecds_get_image_from_url in ecommerce package.)

Look at the acs-lang code/data model for hints on how to tighten responsiveness.

Feature requests




Categories: OpenACS (ec-g2)

No comments available

Add comment