<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
I have a couple of models, listed below.<br>
<br>
I want to be able to pass in a ticket number from RT, and write it
directly to the next available Census.ticket slot, adding the next
available id to Census.id. At the same time, I want to write the
Census.id value to a number of Answer.survey fields for any number of
survey questions, with the answer.id fields populated by a sequence of
next available ids.<br>
<br>
I know how to pass in the ticket value and get the next available ids.
I am trying to figure out how to create a page with several radio
buttons that all write to Answer.id,survey, question and answer&nbsp; in
sequence upon clicking one submit button. From what I understand so
far, it looks like I will need to have an action based on CreateAnswer
and CreateSurvey, and call them in sequence for whatever number of
questions are on the page. <br>
<br>
I could use an example of a radio button being used in a form.<br>
<br>
<br>
Any help would be appreciated.<br>
<br>
Thanks, <br>
<br>
Mat<br>
<br>
------------------------------------------<br>
<span class="message"><font color="#000000">package
Survey::Model::Answer::Schema;<br>
use Jifty::DBI::Schema;<br>
<br>
<font color="#660000">
# Your column definitions go here. See L&lt;Jifty::DBI::Schema&gt; for<br>
# documentation about how to write column definitions.<br>
</font>
<br>
column id =&gt;<br>
type is 'text',<br>
label is 'id';<br>
column survey =&gt;<br>
type is 'text',<br>
label is 'survey';<br>
column question =&gt;<br>
type is 'text',<br>
label is 'question';<br>
column answer =&gt;<br>
type is 'text',<br>
label is 'answer';<br>
column answercode =&gt;<br>
type is 'text',<br>
label is 'answercode';<br>
<br>
package Survey::Model::Answer;<br>
use base qw/Survey::Record/;<br>
<br>
<font color="#660000">
# Your model-specific methods go here.<br>
</font>
<br>
1;<br>
<br>
package Survey::Model::Census::Schema;<br>
use Jifty::DBI::Schema;<br>
<br>
<font color="#660000">
# Your column definitions go here. See L&lt;Jifty::DBI::Schema&gt; for<br>
# documentation about how to write column definitions.<br>
</font>
<br>
column id =&gt;<br>
type is 'text',<br>
label is 'id';<br>
<br>
column ticket =&gt;<br>
type is 'text',<br>
label is 'ticket';<br>
<br>
package Survey::Model::Census;<br>
use base qw/Survey::Record/;<br>
<br>
<font color="#660000">
# Your model-specific methods go here.<br>
</font>
<br>
1;</font></span><br>
<br>
Alex Vandiver wrote:<br>
<blockquote type="cite" cite="mid1146102983.9116.8.camel@localhost">
  <pre wrap="">On Mon, 2006-04-24 at 15:45 -0700, M Brletic wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Provide a screen with radio button questions that can take the input 
from the form and write the ID, Question and Answer to consecutive 
entries in one table. I also want to be able to read an existing table 
containing "index" numbers and write to the next available record, 
without any user input.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The examples in the weblog tutorial were mostly oriented about the
automatically generated Create, Update, Delete actions for each model --
but you can absolutely write arbitrary actions that manipulate their
arguments however you want, doing arbitrary database access.  I'm afraid
I don't really understand what you're trying to do, though, so I can't
really give you any useful concrete examples.
 - Alex
_______________________________________________
jifty-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jifty-devel@lists.jifty.org">jifty-devel@lists.jifty.org</a>
<a class="moz-txt-link-freetext" href="http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel">http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel</a>

  </pre>
</blockquote>
</body>
</html>