Elxis CMS Forum
Extensions => Bots and plugins => Topic started by: armpouniotis on February 01, 2012, 02:50:51
-
Hi there !
When i am using an eform, how can i put 2-3 items side by side and not up-down ?
Thank you in advance
Christos Armpouniotis
-
If i understood exactly what you want to do, You must 'play' with css file ;)
-
Actually i tried to use "table", and inside it cells to put the elements I wanted, but it didn't work out...
Christos
-
eForms has been designed to put each element in its own row. You can not split a row into 2, sorry.
For your information: On Elxis 4.0 Nautilus the elxisForm class allows you to place unlimited elements into the same row. elxisForm supports 32 form elements.
Here is a sample structure:
$form = new elxisForm();
$form->openRow(); //open a new row
$form->addText(...);
$form->addDate(..);
$form->closeRow(); //close row
$form->openRow(); //open an other row
$form->addImage(...);
$form->addCountry(...);
$form->addSlider(...);
$form->closeRow(); //close row
$form->render();
You can also put elements into tabs and fieldsets and do much more.
$form = new elxisForm();
$form->openTab('My first tab');
$form->openFieldset('Test');
$form->addMLText();
$form->openRow();
$form->addNote();
$form->addText();
$form->addDate();
$form->closeRow();
$form->closeFieldset();
$form->closeTab();
$form->openTab('My second tab');
$form->addFile();
$form->closeTab();
$form->addButton();
$form->render();
And here is a real example on creating a text input field with elxisForm:
$eLang = eFactory::getLang();
$form->addText('title', $row->title, $eLang->get('TITLE'), array('required' => 1, 'dir' => 'ltr', 'size' => 50, 'maxlength' => 160, 'tip' => 'Something helpful'));