Form Tools
Radio Button not re-filling - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Radio Button not re-filling (/showthread.php?tid=1288)



Radio Button not re-filling - alexh - May 10th, 2011

Anyone see why this is the only thing that's not re-filling?

PHP Code:
<input name="Owner" type="radio" value="City_of_City_Name" <?php if (@$fields["Owner"] == "City_of_City_Name") echo "checked"?>" /> City of City Name<br />
<input name="Owner" type="radio" value="PGE" <?php if (@$fields["Owner"] == "PGE") echo "checked"?>" /> PGE<br />
<input name="Owner" type="radio" value="USPS" <?php if (@$fields["Owner"] == "USPS") echo "checked"?>" /> USPS<br />
<input name="Owner" type="radio" value="other" <?php if (@$fields["Owner"] == "Other") echo "checked"?>" /> Other, Including Private Property (Enter Below)<br /><br /> 

Figured it out...

I took the quote out that was after ?>...so it looks like this:

PHP Code:
<input name="Owner" type="radio" value="City_of_City_Name" <?php if (@$fields["Owner"] == "City_of_City_Name") echo "checked"?> /> City of City Name<br />
<input name="Owner" type="radio" value="PGE" <?php if (@$fields["Owner"] == "PGE") echo "checked"?> /> PGE<br />
<input name="Owner" type="radio" value="USPS" <?php if (@$fields["Owner"] == "USPS") echo "checked"?> /> USPS<br />
<input name="Owner" type="radio" value="other" <?php if (@$fields["Owner"] == "Other") echo "checked"?> /> Other, Including Private Property (Enter Below)<br /><br /> 

Ben - Maybe you can update the tutorial. :-)

Thanks!
Alex

(May 10th, 2011, 1:00 PM)alexh Wrote: Anyone see why this is the only thing that's not re-filling?

PHP Code:
<input name="Owner" type="radio" value="City_of_City_Name" <?php if (@$fields["Owner"] == "City_of_City_Name") echo "checked"?>" /> City of City Name<br />
<input name="Owner" type="radio" value="PGE" <?php if (@$fields["Owner"] == "PGE") echo "checked"?>" /> PGE<br />
<input name="Owner" type="radio" value="USPS" <?php if (@$fields["Owner"] == "USPS") echo "checked"?>" /> USPS<br />
<input name="Owner" type="radio" value="other" <?php if (@$fields["Owner"] == "Other") echo "checked"?>" /> Other, Including Private Property (Enter Below)<br /><br /> 




RE: Radio Button not re-filling - Ben - May 10th, 2011

Thanks Alex! Will do. Big Grin

(And sorry!!!)

- Ben