krileon wrote: Both are displaying fine in my tests. You likely have a CSS conflict coming from your Joomla template. Nothing I can advise without a URL to the issue (you can PM the URL if you'd like it kept private).
I only get them to display horizontally when I adjust the bootrstrap horizontal.
For me the template is not correct:
Code:
<span class="userdata">
<span id="form-login-username">
<?php if ( in_array( $showUsernameLabel, array( 1, 2, 3, 5 ) ) ) { ?>
<?php if ( in_array( $showUsernameLabel, array( 2, 3, 5 ) ) ) { ?>
<?php if ( $showUsernameLabel == 3 ) { ?>
<label for="modlgn-username"><?php echo htmlspecialchars( $userNameText ); ?></label>
<?php } ?>
<div class="input-prepend input-append">
<span class="add-on">
<span class="<?php echo htmlspecialchars( $templateClass ); ?>">
<span class="cbModuleUsernameIcon fa fa-user" title="<?php echo htmlspecialchars( $userNameText ); ?>"></span>
</span>
</span>
<input id="modlgn-username" type="text" name="username" class="input-small" size="<?php echo $usernameInputLength; ?>"<?php echo ( in_array( $showUsernameLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( $userNameText ) . '"' : null ); ?> />
</div>
<?php } else { ?>
<label for="modlgn-username" class="control-label">
<?php if ( in_array( $showUsernameLabel, array( 1, 3 ) ) ) { ?>
<?php echo htmlspecialchars( $userNameText ); ?>
<?php } ?>
</label>
<input id="modlgn-username" type="text" name="username" class="input-medium" size="<?php echo $usernameInputLength; ?>"<?php echo ( in_array( $showUsernameLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( $userNameText ) . '"' : null ); ?> />
<?php } ?>
<?php } else { ?>
<input id="modlgn-username" type="text" name="username" class="input-medium" size="<?php echo $usernameInputLength; ?>"<?php echo ( in_array( $showUsernameLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( $userNameText ) . '"' : null ); ?> />
<?php } ?>
</span>
<span id="form-login-password">
<?php if ( in_array( $showPasswordLabel, array( 1, 2, 3, 5 ) ) ) { ?>
<?php if ( in_array( $showPasswordLabel, array( 2, 3, 5 ) ) ) { ?>
<?php if ( $showPasswordLabel == 3 ) { ?>
<label for="modlgn-passwd"><?php echo htmlspecialchars( CBTxt::T( 'Password' ) ); ?></label>
<?php } ?>
<div class="input-prepend input-append">
<span class="add-on">
<span class="<?php echo htmlspecialchars( $templateClass ); ?>">
<span class="cbModulePasswordIcon fa fa-lock" title="<?php echo htmlspecialchars( CBTxt::T( 'Password' ) ); ?>"></span>
</span>
</span>
<input id="modlgn-passwd" type="password" name="passwd" class="input-small" size="<?php echo $passwordInputLength; ?>"<?php echo ( in_array( $showPasswordLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( CBTxt::T( 'Password' ) ) . '"' : null ); ?> />
</div>
<?php } else { ?>
<label for="modlgn-passwd" class="control-label">
<?php if ( in_array( $showPasswordLabel, array( 1, 3 ) ) ) { ?>
<?php echo htmlspecialchars( CBTxt::T( 'Password' ) ); ?>
<?php } ?>
</label>
<input id="modlgn-passwd" type="password" name="passwd" class="input-medium" size="<?php echo $passwordInputLength; ?>"<?php echo ( in_array( $showPasswordLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( CBTxt::T( 'Password' ) ) . '"' : null ); ?> />
<?php } ?>
<?php } else { ?>
<input id="modlgn-passwd" type="password" name="passwd" class="input-medium" size="<?php echo $passwordInputLength; ?>"<?php echo ( in_array( $showPasswordLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( CBTxt::T( 'Password' ) ) . '"' : null ); ?> />
<?php } ?>
</span>
I have to remove the first closing div to have all span elements within only one div and then remove some of the spans elements a well.
The working code looks like this:
Code:
<span class="userdata">
<span id="form-login-username">
<?php if ( in_array( $showUsernameLabel, array( 1, 2, 3, 5 ) ) ) { ?>
<?php if ( in_array( $showUsernameLabel, array( 2, 3, 5 ) ) ) { ?>
<?php if ( $showUsernameLabel == 3 ) { ?>
<label for="modlgn-username"><?php echo htmlspecialchars( $userNameText ); ?></label>
<?php } ?>
<div class="input-prepend input-append">
<span class="add-on">
<span class="<?php echo htmlspecialchars( $templateClass ); ?>">
<span class="cbModuleUsernameIcon fa fa-user" title="<?php echo htmlspecialchars( $userNameText ); ?>"></span>
</span>
</span>
<input id="modlgn-username" type="text" name="username" class="input-small" size="<?php echo $usernameInputLength; ?>"<?php echo ( in_array( $showUsernameLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( $userNameText ) . '"' : null ); ?> />
<?php } else { ?>
<label for="modlgn-username" class="control-label">
<?php if ( in_array( $showUsernameLabel, array( 1, 3 ) ) ) { ?>
<?php echo htmlspecialchars( $userNameText ); ?>
<?php } ?>
</label>
<input id="modlgn-username" type="text" name="username" class="input-medium" size="<?php echo $usernameInputLength; ?>"<?php echo ( in_array( $showUsernameLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( $userNameText ) . '"' : null ); ?> />
<?php } ?>
<?php } else { ?>
<input id="modlgn-username" type="text" name="username" class="input-medium" size="<?php echo $usernameInputLength; ?>"<?php echo ( in_array( $showUsernameLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( $userNameText ) . '"' : null ); ?> />
<?php } ?>
</span>
<span id="form-login-password">
<?php if ( in_array( $showPasswordLabel, array( 1, 2, 3, 5 ) ) ) { ?>
<?php if ( in_array( $showPasswordLabel, array( 2, 3, 5 ) ) ) { ?>
<?php if ( $showPasswordLabel == 3 ) { ?>
<label for="modlgn-passwd"><?php echo htmlspecialchars( CBTxt::T( 'Password' ) ); ?></label>
<?php } ?>
<span class="<?php echo htmlspecialchars( $templateClass ); ?>">
<span class="cbModulePasswordIcon fa fa-lock" title="<?php echo htmlspecialchars( CBTxt::T( 'Password' ) ); ?>"></span>
</span>
<input id="modlgn-passwd" type="password" name="passwd" class="input-small" size="<?php echo $passwordInputLength; ?>"<?php echo ( in_array( $showPasswordLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( CBTxt::T( 'Password' ) ) . '"' : null ); ?> />
<?php } else { ?>
<label for="modlgn-passwd" class="control-label">
<?php if ( in_array( $showPasswordLabel, array( 1, 3 ) ) ) { ?>
<?php echo htmlspecialchars( CBTxt::T( 'Password' ) ); ?>
<?php } ?>
</label>
<input id="modlgn-passwd" type="password" name="passwd" class="input-medium" size="<?php echo $passwordInputLength; ?>"<?php echo ( in_array( $showPasswordLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( CBTxt::T( 'Password' ) ) . '"' : null ); ?> />
<?php } ?>
<?php } else { ?>
<input id="modlgn-passwd" type="password" name="passwd" class="input-medium" size="<?php echo $passwordInputLength; ?>"<?php echo ( in_array( $showPasswordLabel, array( 4, 5 ) ) ? ' placeholder="' . htmlspecialchars( CBTxt::T( 'Password' ) ) . '"' : null ); ?> />
<?php } ?>
</span>