I am trying to display form elements inline built using the cakePHP Form helper. It appears it has to do with the classes it creates around the elements. I am sure this can be fixed with CSS but if there is another way i would rather do it right:
<?php
echo $this->Form->create("users");
echo $this->Form->input("username",array("label" => false, "class" => false, "value" => "Username", "class" => "loginCredentials"));
echo $this->Form->input("password",array("label" => false, "class" => false, "value" => "Password", "class" => "loginCredentials"));
echo $this->Form->input("loginBtn",array("label" => false, "class" => false, "value" => "LOGIN", "class" => "loginCredentials", "type" => "submit"));
echo $this->Form->end();
?>
By default, CakePHP puts
<div>s around inputs. You can either add the'div'=>falseoption to each input:Or, you can set the inputDefaults for the form itself: