You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joe Latty <jo...@team2media.com> on 2002/02/10 07:45:03 UTC

Multiple ad-hoc Forms.

Is there a preferred way in the struts framework for ad-hoc type forms?

I am developing a site where the site-administrators want to create forms
for feedback after certain events, these have radio buttons, checkboxes etc
and are made up at various intervals. The results are then emailed to an
administrator of the event.

I have tossed around the idea of creating forms on the fly using the
ApplicationResources.properties file, where they would enter field.type
field.value and field.name however this seems a right royal pain.

Has anyone else come up against this? And they have a brilliant solution?

TIA

Joe

Re: Multiple ad-hoc Forms.

Posted by Ted Husted <hu...@apache.org>.
It doesn't really sound like a framework issue to me. I'd start by
thinking about how you would do this with any servlet, JSP, or CGI
application, and proceed from there. 

You probably want to write a dynamic page, based on a configuration
record that has been stored someplace. If you have a JDBC database on
hand, I'd probably use that. Of course, they could also be flat records,
or XML, or whatever. 

So, they fill out a form that describes the form they want, and this
information is used to write a dynamic HTML page directly to the
response. 

Of course, the form the site-administrators fill out could be based on
the Struts tags, and the code to write the dynamic HTML could be wrapped
in an Action. But other than that, Same old, same old :o)

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/


Joe Latty wrote:
> 
> Is there a preferred way in the struts framework for ad-hoc type forms?
> 
> I am developing a site where the site-administrators want to create forms
> for feedback after certain events, these have radio buttons, checkboxes etc
> and are made up at various intervals. The results are then emailed to an
> administrator of the event.
> 
> I have tossed around the idea of creating forms on the fly using the
> ApplicationResources.properties file, where they would enter field.type
> field.value and field.name however this seems a right royal pain.
> 
> Has anyone else come up against this? And they have a brilliant solution?
> 
> TIA
> 
> Joe

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>