Hey,
I've added several radio boxes (guide: http://www.openscriptsolution.com/2009/11/15/how-to-add-extra-fields-on-the-open-ticket-form-of-client-side-in-osticket-v1-6-rc5(http://www.openscriptsolution.com/2009/11/15/how-to-add-extra-fields-on-the-open-ticket-form-of-client-side-in-osticket-v1-6-rc5)) and it works fine.
Though I want the form to remember which radiobuttons I've selected if I get any error due to missing fields.
My current code for the radiobuttons:
<tr>
<td><b>Ã…terkoppla till kund? </td>
<td>
<?
$aterkomja_checked = (isset($_POST['aterkom) && $_POST['aterkom == 'Ja') ? 'checked' : '';
$aterkomnej_checked = (isset($_POST['aterkom) && $_POST['aterkom == 'Nej') ? 'checked' : '';
?>
<input name='aterkom' type=radio value="Ja" <?=$aterkomja_checked?>>Ja
<input name='aterkom' type=radio value="Nej" <?=$aterkomnej_checked?>>Nej
<font class="error">* <?=$errors?></font>
</td>
</tr>
Above doesn't work. But if I remove the "" on aterkom on everything the form remembers what I checked if any error occurs. BUT then the data won't get to the database.
<tr>
<td><b>Ã…terkoppla till kund? </td>
<td>
<?
$aterkomja_checked = (isset($_POST) && $_POST == 'Ja') ? 'checked' : '';
$aterkomnej_checked = (isset($_POST) && $_POST == 'Nej') ? 'checked' : '';
?>
<input name='aterkom' type=radio value="Ja" <?=$aterkomja_checked?>>Ja
<input name='aterkom' type=radio value="Nej" <?=$aterkomnej_checked?>>Nej
<font class="error">* <?=$errors?></font>
</td>
</tr>
So my problem is.. I can't the form script to work without brackets, or I can't make the isset script to work with the brackets... :(
Do anyone of you know how to solve this? I would really appreciate the help.