trongate / trongate-framework

The Trongate PHP framework
https://trongate.io
Other
1.12k stars 100 forks source link

Update form_helper.php function form_submit #119

Closed ReDeLe-design closed 1 year ago

ReDeLe-design commented 2 years ago

Make a backward compatible possibility to have a submit with an other label than the value. This is mandatory for localization. This works also for the function form_button.

ReDeLe-design commented 2 years ago

Icons inside buttons are also possible. The following code:

$attr_delete = array(
   "class" => "danger go-right",
   "id" => "btn-delete-modal",
   "onclick" => "openModal('delete-modal')",
   "innerHTML" => '<i class="fa fa-trash-o fa-lg"></i>&nbsp;Löschen'
);
echo form_button('delete', 'delete_all', $attr_delete);

renders this nice button: Bildschirmfoto 2022-09-29 um 15 35 05