I need to have the user be able to check a box when the address is the same
what script do i use and where do i put it??
below is the html my php runner generated if ladd1 is the same as addr1 when checked how can i do this thanks

<html {$html_attrs}>
<head><title>Intake</title>
<link REL="stylesheet" href="include/style.css" type="text/css">
<!--[if IE]>
<link REL="stylesheet" href="include/styleIE.css" type="text/css">
<![endif]-->
<style>
#center_block {width:500px;margin:0 auto;}
#contents_block{$id} {text-align:center;}
#header_block{$id} {white-space:nowrap;height:31px;padding-top:5px;text-align:center;}
#fields_block{$id} {width:100%}
#buttons_block{$id} {padding-bottom:5px;white-space:nowrap;text-align:center;}
#required_block{$id} {text-align:left;padding:5px}
#message_block{$id} {padding:5px 0px;text-align:center;}
</style>
</head>
<body>
{BEGIN body}
{$header}
<TABLE class="main_table2" align=center id="center_block" cellpadding=0 cellspacing=0><tr><td id="contents_block{$id}">
{BEGIN flybody}
<div>
<div id="header_block{$id}" class=upeditmenu >
Intake, Add new record
</div>

{BEGIN message_block}
<div id="message_block{$id}" class=downedit>{$message}</div>
{END message_block}

<table cellpadding=4 cellspacing=0 border=0 id="fields_block{$id}">
{BEGIN lastname_fieldblock}
<tr><td class=editshade_b width=150 style="padding-left:15px;">Lastname</td>
<td width=250 class=editshade_lb style="padding-left:10px;">
{$lastname_editcontrol}
</td></tr>
{END lastname_fieldblock}
{BEGIN addr1_fieldblock}
<tr><td class=editshade_b width=150 style="padding-left:15px;">Addr1</td>
<td width=250 class=editshade_lb style="padding-left:10px;">
{$addr1_editcontrol}
</td></tr>
{END addr1_fieldblock}
{BEGIN addr2_fieldblock}
<tr><td class=editshade_b width=150 style="padding-left:15px;">Addr2</td>
<td width=250 class=editshade_lb style="padding-left:10px;">
{$addr2_editcontrol}
</td></tr>
{END addr2_fieldblock}
{BEGIN laddr1_fieldblock}
<tr><td class=editshade_b width=150 style="padding-left:15px;">Laddr1</td>
<td width=250 class=editshade_lb style="padding-left:10px;">
{$laddr1_editcontrol}
</td></tr>
{END laddr1_fieldblock}
{BEGIN laddr2_fieldblock}
<tr><td class=editshade_b width=150 style="padding-left:15px;">Laddr2</td>
<td width=250 class=editshade_lb style="padding-left:10px;">
{$laddr2_editcontrol}
</td></tr>
{END laddr2_fieldblock}
{BEGIN firstname_fieldblock}
<tr><td class=editshade_b width=150 style="padding-left:15px;">Firstname</td>
<td width=250 class=editshade_lb style="padding-left:10px;">
{$firstname_editcontrol}
</td></tr>
{END firstname_fieldblock}
</table>

<div class="toplist" id="buttons_block{$id}">
<div id="required_block{$id}" ><img src="images/icon_required.gif"> - Required field</div>

{BEGIN save_button}
<span class=buttonborder><input class=button type=submit value="Save" name=submit1></span>
{END save_button}
{BEGIN reset_button}
<span class=buttonborder><input class=button type=reset value="Reset" {$resetbutton_attrs}></span>
{END reset_button}
{BEGIN cancel_button}
<span class=buttonborder><input class=button type=button value="Cancel" {$cancelbutton_attrs}></span>
{END cancel_button}
{BEGIN back_button}
<span class=buttonborder><input class=button type=button value="Back to list" {$backbutton_attrs}></span>
{END back_button}
</div>
</div>
{END flybody}
</td></tr>
</table>
{$footer}
{END body}
</body>
</html>

If you know jquery lib it will help you more. You have to copy the content of one textbox/text area to another textbox/tex area on click event of the check box and you may also check if check box is checked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.