Hallo,
ich habe noch weiter an meinem Problem herum probiert und habe dabei festgestellt, das ich meine Argumente schlicht in der falschen Reihenfolge hatte:
PHP-Code:
<tr>
<td width="110" class="key">
<label for="format">
<?php echo JText::_( 'Format' ); ?>:
</label>
</td>
<td>
<?php
$formate = array(Gebunden => 'Gebunden', Einband => 'Einband', Taschenbuch => 'Taschenbuch');
$options = array();
foreach($formate as $key=>$value) :
## Create $value ##
$options[] = JHTML::_('select.option', $key, $value);
endforeach;
?>
<?php echo JHTML::_( 'select.radiolist', $options, 'format', 'class="inputbox"' , 'value', 'text', $this->book->format ); ?>
</td>
</tr
So ergibt es auch die Ausgabe (mal abgesehen von dem immer noch nicht vorhandenen Zeilenumbruch) dann folgenden HTML-Code:
HTML-Code:
<tr>
<td width="110" class="key">
<label for="empfehlung">
Empfehlung (Min=1, Max=10):
</label>
</td>
<td>
<input class="inputbox" type="text" name="empfehlung" id="empfehlung" size="75" value="5" />
</td>
</tr>
<tr>
<td width="110" class="key">
<label for="format">
Format:
</label>
</td>
<td>
<input type="radio" name="format" id="formatGebunden" value="Gebunden" checked="checked" class="inputbox" />
<label for="formatGebunden">Gebunden</label>
<input type="radio" name="format" id="formatEinband" value="Einband" class="inputbox" />
<label for="formatEinband">Einband</label>
<input type="radio" name="format" id="formatTaschenbuch" value="Taschenbuch" class="inputbox" />
<label for="formatTaschenbuch">Taschenbuch</label>
</td>
</tr>
Die ursprüngliche Datenbank kommt aus einer vorherigen reinen PHP-Anwendung, daher sollte eben auch "Gebunden" ... wie bisher in die Datenbank geschrieben werden. Soweit mal so gut, nur leider wird eine Änderung nicht in die Datenbank geschrieben. Hat jemand eine Idee, woran das liegen könnte. Ich bin wie schon gesagt absoluter Anfänger bei der Komponentenentwicklung.
Danke für jede Anregung.
CU
cyberframe
PS: Mein Datenbankfeld habe ich in "format" umbenannt, da ich eine mögliche Fehlerquelle mit dem HTML-Tag ausschließen wollte.
Lesezeichen