<!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 scrip that generates a link to a survey page with the ticket
number (I will also probably add the requestor) passed as an argument.&nbsp;
The survey page will write to the Survey, Answer and Comment tables,
and will have multiple radio button selections and one filed for
comment entry. I couls drop the Survey table entirely and use the
ticket number directly in all answers, but then I lose the capability
to have unique surveys filled out by more than one requestor for a
particular ticket.<br>
<br>
Attached is a schema for what I am trying to do. <br>
<br>
The thing I am trying to figure out is how to use a radio button in a
form with an action. I could use an example of a radio button usage
with two or more possible answers. An example of an action definition
that will work with these buttons would help. <br>
<br>
<br>
Thanks,<br>
<br>
Mat.<br>
<br>
Jesse Vincent wrote:<br>
<blockquote type="cite"
 cite="mid20060428163129.GE24532@bestpractical.com">
  <pre wrap="">I think the problem you may be running into is at least partially that
Jifty takes care of the "id" column for you entirely. 

I think it would help a lot if you can describe your application's data
model in a bit more detail. Don't worry so much about the exact names of
things, but what are the kinds of things you want to keep track of? How
do they relate to each other?

Jesse

On Thu, Apr 27, 2006 at 09:25:37AM -0700, Mat Brletic wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I have a couple of models, listed below.

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.

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  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.

I could use an example of a radio button being used in a form.


Any help would be appreciated.

Thanks,

Mat

------------------------------------------
package Survey::Model::Answer::Schema;
use Jifty::DBI::Schema;

# Your column definitions go here. See L&lt;Jifty::DBI::Schema&gt; for
# documentation about how to write column definitions.

column id =&gt;
type is 'text',
label is 'id';
column survey =&gt;
type is 'text',
label is 'survey';
column question =&gt;
type is 'text',
label is 'question';
column answer =&gt;
type is 'text',
label is 'answer';
column answercode =&gt;
type is 'text',
label is 'answercode';

package Survey::Model::Answer;
use base qw/Survey::Record/;

# Your model-specific methods go here.

1;

package Survey::Model::Census::Schema;
use Jifty::DBI::Schema;

# Your column definitions go here. See L&lt;Jifty::DBI::Schema&gt; for
# documentation about how to write column definitions.

column id =&gt;
type is 'text',
label is 'id';

column ticket =&gt;
type is 'text',
label is 'ticket';

package Survey::Model::Census;
use base qw/Survey::Record/;

# Your model-specific methods go here.

1;

Alex Vandiver wrote:

    On Mon, 2006-04-24 at 15:45 -0700, M Brletic wrote:


        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.



    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>
  <pre wrap=""><!---->
  </pre>
  <blockquote type="cite">
    <pre wrap="">_______________________________________________
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>
  <pre wrap=""><!---->

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