I'm confused about the intent of the field. Based on the list you supplied
in your snippet of code, I would expect only one value to be the correct
selection (i.e. saying weekly and monthly doesn't make sense).
With regards to storing multiple values, what you can do is set up a loop
with a counter and have the name of the field be something with the counter
at the end. For example I use l_counter as a local variable counter. I'd use
the following for each field:
<input type="radio" name="01often@@local$l_counter" value="monthly">
which would give me 01often1, 01often2, etc. Of course the logic shown above
can't be used because the value would need to be changed. I would have the
potential values stored in an array that I could use for both displaying the
original form and for creating a modification form. I use this same logic
for popups, radio buttons, and checkboxes. The array could either be
populated from a table (or database in FM Pro's case) or hard-coded.
Dynamically populating it is easier because the logic can be reused whenever
necessary and adding or modifying a selection means that changes don't have
to be made in multiple locations.
In your insert action you can use a loop action to loop through the insert.
At the risk of starting a heated discussion, I am against the idea of
storing multiple answers in one field. I prefer having a related table (or
database file in FM Pro's case) that stores one record for each multiple
value selected.
Hope this helps,
Steve Smith
Skadt Information Solutions
Office: (519) 624-4388
GTA: (416) 606-3885
Fax: (519) 624-3353
Cell: (416) 606-3885
Email: [EMAIL PROTECTED]
Web: http://www.skadt.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Nicholas Froome
Sent: May 9, 2002 6:16 PM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: embarrassingly simple question re checkboxes in
forms
Okay - for the first time I'm using checkboxes in a form. The problem is
that - however many boxes are checked - only one value is inserted in to the
Filemaker database
Any bright ideas?
I'm just inserting the form result eg <@ARG 01often> into a text field in a
Filemaker 4 database. The code looks a bit like this
<FORM METHOD="POST"
ACTION="<@CGI><@APPFILE>?page=insert&<@USERREFERENCEARGUMENT>"
enctype="multipart/form-data" name="form1">
<!------------- snip -------------->
<tr>
<td bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif"
size="1"> 1.</font></td>
<td colspan="7" bgcolor="#FFFFFF"><font face="Arial, Helvetica,
sans-serif" size="1">How
often do you purchase die-cast models in a year?</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF">
<input type="radio" name="01often" value="monthly">
</td>
<td bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif"
size="1">Monthly</font></td>
<td bgcolor="#FFFFFF">
<input type="radio" name="01often" value="quarterly">
</td>
<td colspan="3" bgcolor="#FFFFFF"><font face="Arial, Helvetica,
sans-serif" size="1">Quarterly</font>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF">
<input type="radio" name="01often" value="twice_year">
</td>
<td bgcolor="#FFFFFF"><font face="Arial, Helvetica, sans-serif"
size="1">Twice
a year</font></td>
<td bgcolor="#FFFFFF">
<input type="radio" name="01often" value="once_year">
</td>
<td colspan="3" bgcolor="#FFFFFF"><font face="Arial, Helvetica,
sans-serif" size="1">Once
a year</font></td>
</tr>
<!------------- snip -------------->
</FORM>
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body