Forum OpenACS Development: Too much customization to use ad_form?
I have several HTML forms, structurally different (i.e. from element positioning & numbering to layout & design style sheets). Thus, functionality and look 'n feel play important roles "together", always.
The list goes infinite, and it's hard to tell if new ways to implement the form and its fields would come up. They probably will,
However, I'm a stubborn adult and I really want to use ad_form, acs-templating and all their benefits behind the scenes, and I've got stuck, trying to migrate them from pure HTML, CSS and JS into acs-templating.
I've tried to find my way out, reading lots and following OpenACS documentation but the tasks are still very painful, and sometimes just impossible to achieve the same results.
Am I on the right track? Is it really the best approach, to use acs-templating, for such customized, unsorted and mutable scenarios?
I must admit to being a little out of touch with the most popular web frameworks (node.js?) but I imagine their approaches are possibly quite different from how OpenACS works. That said it should be possible to create a "modern" website using everything in OpenACS.
(Vague answer to a broad question!)
I agree that it's totally possible to create modern sites using OpenACS.
The main idea behind this post is, once again, to find ways to integrate frontend frameworks (JS based) with backend (OpenACS) more easily.
Thanks for your answer anyway. It has really helped to confirm my suspects about ad_form and even more important, you confirmed that I'm probably in the right path, understanding acs-templating pkg.
I have just recently "upgraded" an HTML mockup with a nice looking form to a ad_form by simply
a) copy-pasting the HTML mockup "as-is" into the ADP file
b) only replacing the <form> tag by <formtemplate> and the input elements by <formwidget>.
c) adding a corresponding TCL file with an ad_form that has a simple element stub defined for each input in the form. (i.e. more or less only my_input_name:text(text),optional)
Because of the fact, that I have only used ad_form with empty <formtemplate> tags in the past (where the whole form look and feel is generated automatically), I was surprised how easy it was to get the basic functionality working. In order to provide server-side validation, I later added a handful of <formerror> tags here and there. There may be useful features of ad_form which can't be used when going this way, but for simple cases, it could be a first step for a migration.
What have you tried? What was the showstopper?