Hi,
I added a new registration field following the guide created by nick.
Everything is ok, but I would like to make a variation..
Instead of creating a registration field like summary so with a text area I would like to create one with a form select..
I copy the code I wrote inside reserve.template.php
<?php
}
/**
* Tabella per selezionare se il socio ha pagato o no.
* @param string $payment environment to edit
* @param string $type type of reservation
*/
function print_payment($payment) {
if (Auth::isAdmin()) { ?>
<table width="200" border="0" cellspacing="0" cellpadding="0" class="recur_box" id="repeat_table" style="margin-top:5px;">
<tr>
<td style="padding: 5px;">
<?php
echo translate('Pay') . ' ';
echo '<select name="payment" id="payment" class="textbox">';
echo '<option value=" '. $payment . ' ">' . translate('No') . '</option>';
echo '<option value=" '. $payment . ' ">' . translate('Yes') . '</option>';
echo '</select>';
?>
</td>
</tr>
</table>
<?php
}
}
As you can see I need only 2 options..
But if I save it doesn't save anything into the database.
I explain how it should work.
Like default value I want the option NO
so everytime I save it should write into Database the text NO
only the administrator can set the option YES.
At this moment if I go in phpmyadmin and I go the row of the registration the column called payment is empty
Other question
I would like to add that field to the search option for the administrator.. how can i do that?
Thank you