2
Quote:
Tarik wrote: Hello, i'm at the moment messing with the 2.6 version of xoops and wanted to try Bootstrap potential in Modules which was amazing but still i didnt know how to use a portion of it, you can see it here http://jasny.github.com/bootstrap/javascript.html#buttons must i code the form with javascript. mainly toggleable buttons and how to include them in forms, can someone informed give some guidance.
You can install the codex module and see the example on form.php If you need to insert javascript in one form element you can use the setExtra() Example of usage in publisher module:
$butt_cancel = new XoopsFormButton('', '', _CO_PUBLISHER_CANCEL, 'button');
$butt_cancel->setExtra('onclick="history.go(-1)"');
$form->addElement($butt_cancel);
If you need to insert a inline script you can use XoopsFormlabel or XoopsFormRaw. Example from publisher
$js_data = new XoopsFormLabel('', '
');
$form->addElement($js_data);
Btw, when you look into the form example, you will see that the form is padded to the right. Can you find a way to fix it, I've tried for hours with no success :(