addGroup aligne elements inside

matc1
Member | 19
+
0
-

Hi, i use bootstrap with Nette, how is it possible to align form elements (submitButton for example) inside addGroup().

My case is:

$form->addGroup("");
$form->addSubmit(‘first_page’, LABEL_FIRST_PAGE)
->setHtmlAttribute(‘onclick’, ‘return checkEdited(true)’);
$form->addSubmit(‘previous_page’, LABEL_PREVIOUS_PAGE)
->setHtmlAttribute(‘onclick’, ‘return checkEdited(true)’);
$form->addSubmit(‘next_page’, LABEL_NEXT_PAGE)
->setHtmlAttribute(‘onclick’, ‘return checkEdited(true)’);
$form->addSubmit(‘last_page’, LABEL_LAST_PAGE)
->setHtmlAttribute(‘onclick’, ‘return checkEdited(true)’);
$form->addSubmit(‘pulsante’, LABEL_CURRENT_PAGE)
->setHtmlAttribute(‘id’, ‘rb1’);

All Button align on the right.

I want to align al button on left , is it possible to do this?

Thanks a lot.

Marek Bartoš
Nette Blogger | 1165
+
+1
-

I would use manual rendering. It should be easy if you also use Latte templates.

https://doc.nette.org/…ms/rendering#…
https://github.com/…/forms.latte

Btw, your form looks like datagrid pagination. In that case (if you use nette/application) a datagrid component could work better. My personal favorite is nextras/datagrid, but there is also very popular ublaboo/datagrid

matc1
Member | 19
+
0
-

Mabar wrote:

I would use manual rendering. It should be easy if you also use Latte templates.

https://doc.nette.org/…ms/rendering#…
https://github.com/…/forms.latte

Btw, your form looks like datagrid pagination. In that case (if you use nette/application) a datagrid component could work better. My personal favorite is nextras/datagrid, but there is also very popular ublaboo/datagrid

Thanks!