[ic] help with writing an array into a field..

Geoff Sternecker geoffs at rdgi.com
Thu Jul 3 15:20:05 EDT 2003


Two different problems:
A) Store the values of checkboxes into a single field..

<!-- Begin Example A-->
<td class="clabel">Departments Involved:</td>
<td class="cwidget">
	<INPUT TYPE="checkbox" NAME="req_depts" value="acct">Accounting<br>
	<INPUT TYPE="checkbox" NAME="req_depts" value="purch">Purchasing<br>
	<INPUT TYPE="checkbox" NAME="req_depts" value="ship">Shipping<br>
	<INPUT TYPE="checkbox" NAME="req_depts" value="eng">Engineering<br>
	<INPUT TYPE="checkbox" NAME="req_depts" value="shop">Shop<br>
	<INPUT TYPE="checkbox" NAME="req_depts" value="market">Marketing<br>
	<INPUT TYPE="checkbox" NAME="req_depts" value="webdev">Web</td>
<!-- End Example A-->

Currently, I have them all as separate fields (IE. acct_req, purch_req, 
ship_req.. etc.), but I would rather dump them all into one.. can this be 
done in IC & Perl or do I need to research Javascript?

B)Store the session username of all people that have marked an item as "read" 
into a single field. Then parse the list so their name will only be in there 
once.
was thinking something like..

<!-- Begin Example B-->
[set mv_data_enable]1[/set]
[tag flag write]readby[/tag]
[update values]
[loop list="[value-extended doc_id]"]
<FORM ACTION="[process]" METHOD=POST>
<INPUT TYPE=hidden NAME="mv_nextpage" VALUE="docs">
<INPUT TYPE=hidden NAME="mv_data_table" VALUE="readby">
<INPUT TYPE=hidden NAME="mv_data_key" VALUE="doc_id">
<INPUT TYPE=hidden NAME="mv_data_function" VALUE="update">
<INPUT TYPE=hidden NAME="mv_data_fields" VALUE="doc_id, reader">

Document#: [loop-data readby doc_id] 
created by: [loop-data readby username]<br>

Named:[loop-data readby doc_name]<br>
Has been read by: [loop-data readby reader]<br>
[seti readlist][loop-data readby reader][/seti]
[if-loop-data readby reader]
[seti willread][loop-data readby reader], [data session username][/seti]
[else][seti willread][data session username][/seti]
[/else][/if-loop-data]

<INPUT TYPE="hidden" NAME="doc_id" value="[value-extended doc_id]">
<INPUT TYPE="hidden" NAME="reader" value="[scratch willread]">
<INPUT TYPE="submit" value="I read this!">
<INPUT TYPE=hidden NAME="mv_todo" VALUE="set">
</FORM>
[/loop]
<!-- End Example B-->

Thanks in advance,
Geoff Sternecker

-------------------------------------------------------



More information about the interchange-users mailing list