Click to See Complete Forum and Search --> : How to use $from-addElement to add "select" element at the same line ?


Robert Chu
08-27-2006, 08:38 PM
Hello, The following code will add the two elements at different lines. How can I add elements at the same line ?

$form->addElement('date','from',Null,$options);
$form->addElement('date','to'," ~ ",$options);
$form->Display();

NogDog
08-27-2006, 09:20 PM
Without knowing what the addElement() method does, I can't say (other than you'll probably either need to modify that method, or create another method).

Robert Chu
08-27-2006, 09:39 PM
$form = New HTML_QuickForm(....)

Robert Chu
08-28-2006, 01:38 AM
May I add the two select element as the same line ?

<?php

require_once "HTML/QuickForm.php";
$form = New HTML_QuickForm();
$options = array( 'language' => 'en',
'format' => "Y-m-d",
'minYear' => 2002,
'maxYear' => 2006);
$form->addElement('date','from',Null,$options);
$form->addElement('date','to',Null,$options);
$form->display();

?>